Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > iostream conflicts fstream?

Reply
Thread Tools

iostream conflicts fstream?

 
 
Michael
Guest
Posts: n/a
 
      10-08-2011
#include <iostream>
//#include <fstream>

Hi
when using both i get tons of errors but as above only
a few alike:
std:fstream out’ has incomplete type and cannot be defined
....

Any help? Thanks
Michael
 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      10-08-2011
On 10/8/2011 7:35 AM, Michael wrote:
> #include <iostream>
> //#include <fstream>
>
> Hi
> when using both i get tons of errors but as above only
> a few alike:
> std:fstream out’ has incomplete type and cannot be defined
> ...


If you get errors by simply including two standard headers, your
compiler is f***ed up. Or you're using headers from two different
compilers. Or you didn't install them correctly (something is missing
from the entire installation). Or maybe the errors are due to some
other reason that you didn't list here. Try posting the *complete*
source code that causes your problem. In the mean time, seek help from
the technical support people for your compiler, who, BTW, will want the
source code that causes problems, too.

V
--
I do not respond to top-posted replies, please don't ask
 
Reply With Quote
 
 
 
 
Michael
Guest
Posts: n/a
 
      10-08-2011
Victor I try to compile a osx project on linux that uses aes:
---------
/* AES - Advanced Encryption Standard

source version 1.0, June, 2005

Copyright (C) 2000-2005 Chris Lomont

This software is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must
not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.

Chris Lomont
http://www.velocityreviews.com/forums/(E-Mail Removed)

The AES Standard is maintained by NIST
http://csrc.nist.gov/publications/fi...7/fips-197.pdf

This legalese is patterned after the zlib compression library
*/

// code to implement Advanced Encryption Standard - Rijndael
// speed optimized version
#include "AES.h"
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
//#include <fstream>
//#include <assert.h>
//#include <pstring>
//using namespace std;


-----------------
uncommenting fstream in aes.cpp gives ~400 errors...
i use qtcreator with this pro file:
-------

unix:!macx {
DEFINES += APL=0 IBM=0 LIN=1
LIBS += -L../third_party_source/bullet-2.77/src/BulletDynamics
LIBS += -L../third_party_source/bullet-2.77/src/BulletCollision
LIBS += -llua -lBulletDynamics -lBulletCollision -lLinearMath
-lcurl -lopenal -lalut
TARGET = lin.xpl
# WARNING! This requires the latest version of the X-SDK !!!!
# QMAKE_CXXFLAGS += -fvisibility=hidden
}

-------
About my biggest project to compile so far, so thanks
Michael

 
Reply With Quote
 
Michael
Guest
Posts: n/a
 
      10-08-2011
 
Reply With Quote
 
Michael
Guest
Posts: n/a
 
      10-08-2011
Victor, about my biggest compilation so far. Originates from osx which
i compile on Ubuntu 10.04, so thanks. It uses aes as below:
----
/* AES - Advanced Encryption Standard

source version 1.0, June, 2005

Copyright (C) 2000-2005 Chris Lomont

This software is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must
not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.

Chris Lomont

The AES Standard is maintained by NIST
http://csrc.nist.gov/publications/fi...7/fips-197.pdf

This legalese is patterned after the zlib compression library
*/

// code to implement Advanced Encryption Standard - Rijndael
// speed optimized version
#include "AES.h"
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
//#include <fstream>
//#include <assert.h>
//#include <pstring>
//using namespace std;


uncommenting fstream returns ~400 errors. I also use qtcreator with a
project file as below:

---------
unix:!macx {
DEFINES += APL=0 IBM=0 LIN=1
LIBS += -L../third_party_source/bullet-2.77/src/BulletDynamics
LIBS += -L../third_party_source/bullet-2.77/src/BulletCollision
LIBS += -llua -lBulletDynamics -lBulletCollision -lLinearMath
-lcurl -lopenal -lalut
TARGET = lin.xpl
}

 
Reply With Quote
 
Michael
Guest
Posts: n/a
 
      10-08-2011

> //#include <fstream>


this is causing that many errors. Is there any replacement?

 
Reply With Quote
 
Dombo
Guest
Posts: n/a
 
      10-08-2011
Op 08-Oct-11 19:05, Michael schreef:
>
>> //#include <fstream>

>
> this is causing that many errors. Is there any replacement?
>


The #include <fstream> is not the real source of the problem, reread
Victors answer.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Semi OT: Mixing iostream and iostream.h red floyd C++ 3 03-08-2005 05:57 PM
iostream + iostream.h S. Nurbe C++ 7 01-15-2005 07:49 AM
is MS newer <iostream> is slower than older <iostream.h>? ai@work C++ 9 12-16-2004 08:21 PM
Conflicts with radio telephones - channel changes? Stuart B Wireless Networking 2 11-02-2004 12:38 AM
#include <iostream.h> or <iostream> John Tiger C++ 10 08-06-2003 01:30 PM



Advertisments