なぜ、この言語は配列の宣言が面倒なんだろう
//c++ 完全な添え字省略は無理
int arycpp[3][2] = {{1, 2}, {3, 4}, {5, 6}};
int arycpp2[][2] = {{1, 2}, {3, 4}, {5, 6}};
//C#
int [3,2] arycs = {{1, 2}, {3, 4}, {5, 6}};
int [,] arycs2 = {{1, 2}, {3, 4}, {5, 6}};
//C++/CLI
array<int,2> ^arycli = gcnew array<int,2>(3,2){{1, 2}, {3, 4}, {5, 6}};
array<int,2> ^arycli2 = {{1, 2}, {3, 4}, {5, 6}};
だが、この言語仕様は…
//2次元配列なのに1次元しかないぞ!?
array<int,2> ^arycli = {};
Console::WriteLine("GetLength(0): {0:X}", arycli->GetLength(0));
Console::WriteLine("GetLength(1): {0:X}", arycli->GetLength(1));
萌え