vc2005的托管代码已经和vc2003的代码有非常大的区别了,自己在做程序的时候发现,一个新的操作符^让人搞得晕头转向了.搞不清楚他到底是不是指针运算符,反正*不管用了.这里示例声明了几个数组,有string型的,有Int32型的.感觉怪怪的.看来要过渡过到这个环境,还得仔细看一下才行啊.
array^ gc1 = gcnew array{"one", "two", "three"};
array^ gc2 = {"one", "two", "three"};
array^ gc3 = gcnew array{gcnew G(0), gcnew G(1), gcnew G(2)};
array^ gc4 = {gcnew G(0), gcnew G(1), gcnew G(2)};
array^ value1 = gcnew array{0, 1, 2};
array^ value2 = {0, 1, 2};
array^ value3 = gcnew array{V(0), V(1), V(2)};
array^ value4 = {V(0), V(1), V(2)};
array^ native1 = gcnew array{new N(0), new N(1), new N(2)};
array^ native2 = {new N(0), new N(1), new N(2)};
阅读(1220) | 评论(0) | 转发(0) |