odd iostream errors
um, for some reason, #include <iostream> gives me about 80 compile errors. The errors themselves are actually in various other files (streambuf, xiosbase, ios, ostream, etc.).
#include <iostream.h> does work fine though, and as a quick test, I tried #include <vector> (just in case windows maybe got confused on the (lack of a ) file extension) and that worked fine also.
Are my headers screwed or something?
shot in the dark: try throwing a using namespace std; just after the #include <iostream>
-me
-me
that actually doesn''t do anything, heh (yeah, that''s what I thought of too). This is the whole program, lol:
#include <iostream>using namespace std; //whether this is here or not, it still acts stupidvoid main(){ //boy, I wish I could do a hello world program }
What compiler are you using? Your iostream may be corrupted.
/*=========================================*/
/* Chem0sh */
/* Lead Software Engineer & Tech Support */
/* http://www.eFaces.biz */
/*=========================================*/
/*=========================================*/
/* Chem0sh */
/* Lead Software Engineer & Tech Support */
/* http://www.eFaces.biz */
/*=========================================*/
/*=========================================// Chem0sh// Lead Software Engineer & Tech Support// http://www.eFaces.biz=========================================*/
Are you using MSVC with the SGI STL? And please, the signature for main requires an int return type.
quote: Original post by Oluseyi
And please, the signature for main requires an int return type.
Who really cares?
---visit #directxdev on afternet <- not just for directx, despite the name
quote: Original post by Oluseyi
Are you using MSVC with the SGI STL? And please, the signature for main requires an int return type.
got me there...that''s what I''m using. Actually, I sort of suspected that was the problem, but I wasn''t quite sure.
That''s why I gave up on STL''s STL and switched to STLport.
---visit #directxdev on afternet <- not just for directx, despite the name
quote: Original post by Oluseyi
And please, the signature for main requires an int return type.
The main function can be declared as returning void (no return value). If you declare main as returning void, you cannot return an exit code to the parent process or operating system using a return statement; to return an exit code when main are declared as void, you must use the exit function.
Arguing on the internet is like running in the Special Olympics: Even if you win, you're still retarded.[How To Ask Questions|STL Programmer's Guide|Bjarne FAQ|C++ FAQ Lite|C++ Reference|MSDN]
quote: Original post by dalleboy
The main function can be declared as returning void (no return value).
... but it is illegal to do so.
quote: Original post by IndirectX
Who really cares?
Anyone who is interested in portability. Anyone who codes by intention rather than by accident.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement