C++ IDE/Compiler

Pages: 12
its goes something like this
1
2
3
4
5
6
7
8
#include <iostream>
using namespace std;

int main() 
{
      cout << "Hello World" << endl;
      return 0;
}
Code::Blocks assumes files with the extension .c are C files.
Try/Confirm you are using the correct .cpp extension.

Tim S.
Because it's good to get rid of what is in my opinion a "bad" habit early on, get rid of the using namespace std; at the beginning of your code and change your output statement from cout to std::cout. Whenever you just say using namespace std; you're just begging to end up with name collisions. Also, while this is just preference I prefer VC++ 2008 over the 2010 version. I find that 2008 runs smoother :)
I too prefer VC++2008, although I;ve never use any other compiler for C++...thus, I am not at liberty to give a valid opinion. The only thing to caution is that you must start a New Blank Project and not a new console project, because console projects are evil.
Topic archived. No new replies allowed.
Pages: 12