GCC 4.0.1 - iostream: No such file or dir....

Chris Garrett cgarrett@degarrah.com
Sun Aug 7 20:19:00 GMT 2005


dank@kegel.com wrote:

>Chris Garrett <cgarrett@degarrah.com> wrote:
>  
>
>>main.cpp:5: error: 'cout' was not declared in this scope
>>    
>>
>This question should have been sent to gcc-help, not here.
>  
>
Sorry about this. What criteria is there for posting to gcc vs gcc-help?

>But as long as I'm answering:
>
>It's std::cout now, according to the C++ standard.
>If you want to compile old code that wasn't aware of std,
>you can stick
>  using namespace std;
>at the top.
>
>  
>
Thanks for answering, I forgot to mention that I did try adding the 
namespace prefix and also the "using" statement and I get the same error. 

Thank you

Chris



More information about the Gcc mailing list