PaulW asked on my CP article’s forum whether C++/CLI has support for jagged arrays. In the old syntax, there was no direct syntactical support for jagged arrays and we were left with the rather uneasy option of simulating jagged arrays through contrived code. My first answer to him was that there wasn’t direct support for jagged arrays in the new syntax as far as I knew. But Holger Grund (VC++ MVP) pointed out to me that it was quite easy to do jagged arrays in C++/CLI.
For example, the following C# code :-
int[][] arr = new int[][5]; // C#
corresponds to the following C++ code :-
array<array<int>^>^ arr = gcnew array<array<int>^> (5); // C++
Nice eh?
If you’re such a VC fanatic, why do you use php for your blog?
Good question Matt. It’s just that my web host option only gives me MySQL (means I don’t have SQL server). So I can’t use any of the ASP.NET blog apps, and I can’t afford SQL server based hosting options either 😦
Nish
Gosh… it seems like C++ just can’t escape these ugly, overly complex declarations. Is there any way to make the C++ version easier on the eyes? …a typedef maybe?
Please keep up with the nice work!
Roger
Wow, that pingback thing is nice. I was a little surprised when I got a mail notification for a comment and then found it wasn’t a real comment, but a pingback from one of my own blog entries 🙂
Ye roger’s question is a good one, is there some way to make it less of an eyesore ?