My Visual C++ 2010 creates the main function like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include "stdafx.h"
#include "Form1.h"
usingnamespace Test;
[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
// Create the main window and run it
Application::Run(gcnew Form1());
return 0;
}