Building confusion using C++ [message #902857] |
Mon, 20 August 2012 18:23 |
H vN Messages: 9 Registered: November 2009 |
Junior Member |
|
|
Hi,
Using openSuse 12.1 and CentOS 6.3, both x64, and Eclipse Juno with CDT for Juno, I experience some weird behaviour. When writing some simple code as for printing "Hello" in C, there is no problem. However, when I try the same in C++, using this code:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello" << endl;
return 0;
}
it says:
<iostream>: unresolved inclusion
Symbol 'std' could not be resolved
Symbol 'cout' could not be resolved
Symbol 'endl' could not be resolved
Then, because I know g++ and libs have been installed, I build the project, create the configuration and run it. And it does print "Hello" in the console. Can somebody explain this? It is rather confusing and never had this in the many years I've used Eclipse/CDT.
Thank you.
|
|
|
Powered by
FUDForum. Page generated in 0.03083 seconds