Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Building confusion using C++
Building confusion using C++ [message #902857] Mon, 20 August 2012 18:23
H vN is currently offline H vNFriend
Messages: 9
Registered: November 2009
Junior Member

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.
Previous Topic:CDT UI - What does this icon mean?
Next Topic:No c++ preferences
Goto Forum:

Current Time: Mon Aug 21 06:49:22 GMT 2017

Powered by FUDForum. Page generated in 0.04849 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software