c++ 2005...
Anyways to get started..
Open Microsoft C++ studio, create a new CLR Console application.
Now you should be in code mode add this source I will explain rest in a minute.
// Hello World1.cpp : main project file.
#include "stdafx.h"
using namespace System;
int main(array<System::String ^> ^args)
{
Console::WriteLine(L"Hello World");
return 0;
}
Ok the
// Hello World1.cpp : main project file.
Is telling us the project name so when you click on new CLR Console application at the bottom it will ask you for a name and I put "Hello World1" seeing as I already had a "Hello World".
Now
#include "stdafx.h"
Is telling us we have an include named stadfx.h.
using namespace System;
Is pretty simple its basicly using the namespace System to write lines.
int main(array<System::String ^> ^args)
That is going to make the lines so they write onto the Application.
Console::WriteLine(L"Hello World!");
This is very important. That is going to write the line "Hello World!"
Always write lines using the
Console::WriteLine
Method. You must have the (L" in there or else it will not print the line, you also need the ; telling it its the end of the line.
The } is telling it its the end of the project so it can stop and wont go any furthur.
Note: When de bugging click Debug> Start without debugging.