Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

porting from Unix g++

Status
Not open for further replies.

Wolfie7873

Technical User
Jan 15, 2004
94
US
Been using the g++ compiler on Unix and my code compiles fine. I've just started using MS Vis. C++ and am still waiting on my book to arrive in the mail so i'll know what i'm doing, but until then, maybe you can help.

So, used-to just #include<fstream.h> and everything was great, but i've since learned to drop the &quot;.h&quot;, but it still didn't work. I tried adding, &quot;using namespace std;&quot; cause I saw it somewhere else, but I don't understand it, please explain how to completely adjust my compiler directives to port my code properly.

Thanks,
Eddie
 
you must not mix STL with extension .h with STL without extension. For example you must not use both
#include<iostream.h>
#include<fsream>
or vice versa.
Use or
#include<iostream.h>
#include<fsream.h>
or
#include<iostream>
#include<fsream>

Ths same thing sith vector/list....


Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top