Managed C++ is going to have a totally new syntax, and it is now called C++/CLI .
i was informed of this from here. You may go and see qqchen's brief comparation of the old syntax and the new one. The draft of the new syntax is available here.
i have just tried the new syntax , and found it works in VS2005 CTP edition. But the default syntax of managed C++ project is set to the old one. You may notice that the project is built with the /clr:oldsyntax compiler option turned on.
my first program: (it is grabbed from the draft mentioned above )
#using <mscorlib.dll>
ref class Class1
{
public:
int Value;
Class1()
{
Value = 0;
}
};
int main()
{
int val1 = 0;
int val2 = val1;
val2 = 123;
Class1^ ref1 = gcnew Class1; // new syntax for a managed reference
Class1^ ref2 = ref1;
ref2->Value = 123;
System::Console::WriteLine("Values: {0}, {1}", val1, val2);
System::Console::WriteLine("Refs: {0}, {1}", ref1->Value, ref2->Value);
}