I am a complete newbe in C++.
I am trying to run this code:
but it can not compile:#include <iostream>
using namespace std;
int main()
{
count<<"hello world\n";
cin.get();
}
gcc -c "/home/vincent/Dropbox/learning/cplusplus/tutorial/tutorial/main.c" -g -o ./Debug/main.o -I. -I.
/home/vincent/Dropbox/learning/cplusplus/tutorial/tutorial/main.c:1:20: fatal error: iostream: No such file or directory
compilation terminated.
so I thought the compiler could not find iostream. I looked for it and found it is in /usr/include/c++/4.6/
I changed the settings of the project accordingly:
project settings/compiler/include paths: /usr/include/c++/4.6/
Now I have this error:
gcc -c "/home/vincent/Dropbox/learning/cplusplus/tutorial/tutorial/main.c" -g -o ./Debug/main.o -I. -I. -I/usr/include/c++/4.6/
In file included from /home/vincent/Dropbox/learning/cplusplus/tutorial/tutorial/main.c:1:0:
/usr/include/c++/4.6/iostream:39:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.
Another things that I do not get is that I configured to use g++:
project settings/general/compiler: gnu g++
but apparently gcc is used instead. Not sure why.
Anything I am missing ?
Many thanks !
Vincent