Hi all,
I have a C++ program (resource.cpp):
#include "iostream"
...
cout << value;
...
On compiling with "g++ resource.cpp", I get:
resource.cpp:18: `cout' undeclared (first use this function)
I've tried:
g++ -I /usr/include/c++/3.2/ resource.cpp
in which case I get the following:
cc1plus: warning: changing search order for system directory
"/usr/include/c++/3.2"
cc1plus: warning: as it has already been specified as a non-system
directory
g++ -I /usr/include/c++/3.2/ resource.cpp
I've checked and iostream is present in /usr/include/c++/3.2/
I'm sure this is something trivial, but havent managed to get
to the bottom of it after considerable digging and head scratching.
Any help will be much appreciated.
Thanks,
-Vineet
It is indeed trivial - as of gcc version 3 and later - it conforms to the
c++ standard with increased accuracy ... as such the standard library
elements are now in namespace std.