User forums > Help
#include <iostream> NO such File or Directory
shiguy48:
hello there i am new to c++
i have tryed to compile this program but it says
#include <iostream> NO such File or Directory
was just wondering y as some of my programs work right but some do this
#include <iostream>
using namespace std
main()
{
cout << "hello there Does this program work" << endl;
cout << "check it a new line" << endl;
return(0);
}
any help would be apprecated greatly thx
TDragon:
Sounds like your compiler is incorrectly installed; are you using MinGW/GCC?
(Note: Once this problem is fixed, you'll also need a semicolon ";" after using namespace std and an "int" before main(), to successfully compile.)
killerbot:
just checked this with MinGW GCC4.2.1, works ok, with the side effect that the the file is found twice !!!
Once in : c:\MinGW\lib\gcc\mingw32\4.2.1-dw2\include\c++\iostream
and once in C:\MinGW\lib\gcc\mingw32\4.2.1-dw2\include\c++\iostream
note the difference : c <---> C:
This is something we didn't have with MinGW GCC 3.4.5, or it should be a very recent regression; Can anyone check this with the latest svn on MinGW3.4.5 ? The earliest I can get hold of a MinGW GCC 3.4.5 system is on monday.
gd_on:
I tried this program with gcc 3.4.5 after corrections suggested by Tdragon. (C::B 4564, windows XP, SP2)
Activating all warning and strict iso checking... full message display...
But all is working well, no problem at compilation or link time. No double definition. But may be I forgot to activate something !
gd_on
killerbot:
forgot the power of remote desktop : on on GCC 3.4.5 system this is OK. So it seems that with GCC 4.2.1 we probably shouldn't add it's internal compiler list (cc plug-in), or something like that ....
Navigation
[0] Message Index
[#] Next page
Go to full version