Re: iostream.h not found
guddu wrote:
Hi,
I have installed g++ for windows from http://www.cmc.edu/math/alee/g++/g++.html
g++ is coorectly installed and path is set.
However looks like, path for standard header files is not set.
So when I use cout in the code, the code file gets compiled but it
gives the error as follows:
E:\Documents and Settings\VISHAL>g++ file.cpp
file.cpp: In function 'int main()':
file.cpp:7: error: 'cout' was not declared in this scope
if I #include<iostream.h>
I get following error :
E:\Documents and Settings\VISHAL>g++ file.cpp
file.cpp:3:21: error: iostream.h: No such file or directory
file.cpp: In function 'int main()':
file.cpp:7: error: 'cout' was not declared in this scope
Do I need to install standard file from some other location or some
other path needs to be set.
iostream.h is not a standard C++ header. Some implementations support it
for compatibility with pre-standard (i.e. pre-1998) C++.
Since you didn't show the code that failed to compile, it's impossible
to say more about why it failed.
--
Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of
"The Standard C++ Library Extensions: a Tutorial and Reference"
(www.petebecker.com/tr1book)