|
-
Nov 13th, 2006, 12:39 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] This array doesn't work.
The book example of this array has an error when I try to run it.
int[][] x = { { 2, 3 }, { 4, 5 }, { 6, 7 } };
error:
Array initializers can only be used in a variable or field initializer. Try using a new expression instead.
Ok, after looking at the MSDN, I think it should look like:
int[,] x = new int[3, 2];
Is the book example above(up top) even correct?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|