Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 iostream error
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
connorc




PostPosted: Thu Apr 10, 2008 2:29 am   Post subject: iostream error

I tried to compile this simple program to see why my iostream header <iosteam> is not working,


#include <iostream>

int main(void)
{
return 0;
}



and i got this error on MVS8,


Compiling...
main.cpp
c:\program files\microsoft visual studio 8\vc\include\iostream(42) : warning C4068: unknown pragma
c:\program files\microsoft visual studio 8\vc\include\cstdlib(23) : error C2039: 'exit' : is not a member of '`global namespace''
c:\program files\microsoft visual studio 8\vc\include\cstdlib(23) : error C2873: 'exit' : symbol cannot be used in a using-declaration
c:\documents and settings\hp_owner\desktop\triple triad\tt\main.cpp(4) : error C2084: function 'int main(void)' already has a body
c:\program files\microsoft visual studio 8\vc\include\istream(6) : see previous definition of 'main'
Build log was saved at "file://c:\Documents and Settings\HP_Owner\Desktop\Triple Triad\TT\Debug\BuildLog.htm"
TT - 3 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Help please.
Sponsor
Sponsor
Sponsor
sponsor
Dragan




PostPosted: Thu Apr 10, 2008 3:53 am   Post subject: RE:iostream error

That code is ok. , try that code with new blank workspace.
wtd




PostPosted: Thu Apr 10, 2008 8:38 am   Post subject: RE:iostream error

I know the solution.

Use GCC.
md




PostPosted: Thu Apr 10, 2008 10:41 am   Post subject: RE:iostream error

Definitely seems like a microsoft error, I second using a decent compiler.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: