2

How do I tell what version of Objective-C I'm using? I'm using a Mac with xCode. The reason I ask is because i have a book "Objective-C 3.0" and it says that you can declare an multidimensional array like this.

int[,] num = new int[2,2];

When I try to do this I get a syntax error. Do I need to import another header other than foundation?

Sreekanth
  • 385
  • 1
  • 6
  • 17

3 Answers3

6

Have you tried changing

new int[2.2]

to

new int[2,2]

?

Walt W
  • 3,261
  • 3
  • 30
  • 37
0

I think Walt's answer is right, but here's a good resource for determining which version of C# you're using with your .NET install (thanks to Jon Skeet's "C# In Depth" book!):

http://csharpindepth.com/Articles/Chapter1/Versions.aspx

Andy White
  • 86,444
  • 48
  • 176
  • 211
0

Are you sure that you are programming in C# and not Objective C? Importing foundation is something you would do in Objective C, not C#.

shf301
  • 31,086
  • 2
  • 52
  • 86