• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

VC++ and unix c++ ...

hergehen

Senior member
Hello,


I'm trying to do some program for windows, but I'm not used to program in VC++ 🙁 ... so I wrote classes in unix (gcc) ... are they compatible ... ? .. and how do I find what header files(classes) does vc++ has ? ...

for now I need: string, iostream, fstream ... maybe more later ...

thx.
 
here are the include lines you'd need in VC++

#include <iostream>
#include <string>
#include <fstream>

So yes, I would guess that they're somewhat compatible... not familiar with gcc, though, so I couldn't say for sure.

JW
 
yeah, the same in gcc ....

but when I did simple program in vc++

#include <iostream>

int main()
{

cout << "test";

};


it just gave me some weird error 🙁 ... forgot what it was though, will try later again 🙂
 
you should use
<iostream.h>

if you use it without the ".h", then do this:

<iostream>
using namespace std; // stands for standard library, not sexual deseases 🙂

void main()
{
...
 


<< Hello,


I'm trying to do some program for windows, but I'm not used to program in VC++ 🙁 ... so I wrote classes in unix (gcc) ... are they compatible ... ? .. and how do I find what header files(classes) does vc++ has ? ...

for now I need: string, iostream, fstream ... maybe more later ...

thx.
>>


- as long as you stick to ANSI C++ (or stay close to it), you should have very little problems with the more ANSI-compliant compilers. VC++ is one of the least ANSI-compliant compilers in existance. gcc is much better already.

- if you only use header files which are part of the standard library, every compiler will have the required header files to compile your code.
 
Well if you just cut and paste your code into a text file and send it to yourself...and then paste it into the compiler your using...
as long as your code is sound, I don't see why there would be any problems.
 
Back
Top