Visual C++, not this C++?

I am 13. Trying to get stated learning C++. But am having trouble getting the "Hello World" program to work properly. The C++ syntax taught on this sight is completely different to the code in Visual C++ Express Edition.

When you open the program, and create a CLR Console application, this is the code that is in it;

#include "stdafx.h"

using namespace System;

int main(array<System::String ^> ^args)
{
Console::WriteLine(L"Hello World");
return 0;
}

Result:

Black box/program opens, says "Hello World", closes instantly.
The main thing I am concerned about is the syntax, it seems _completely_ different to what is taught here. (1) What compiler should I use?
(2) What system("pause"); type thing should I use so it doesn't close?
closed account (z05DSL3A)
When you start a new project choose Win32->Win32 Console Application.

CLR is .net and uses C++/CLI not C++
Thanks!
another variation of this if you are doing it as a console app could go as follows
1
2
3
4
5
6
7
8
9
10
11
#include <iostream>

int main()
{
std::cout << "hello world!!!!" << endl;


return 0;
}


(2) What system("pause"); type thing should I use so it doesn't close?

Choose "the standard way" : http://www.cplusplus.com/forum/articles/7312/ if you are writing unmanaged C++ ( Not CLI )
Topic archived. No new replies allowed.