4

I need to represent some spatial points: x,y,z

when I try to initialize the array like this:

int[][][] points
{
   {
      {100, 120, 10},
      {100, 120, 18},
      ...
   }
}

I got an error: Uncompilable source code - not a statement

where is the error?

2 Answers 2

13

You just forgot the = sign and a semicolon ;

int[][][] points = {{{100, 120, 10}, {100, 120, 18}}};
Sign up to request clarification or add additional context in comments.

1 Comment

and the semicolon at the end.
3
int[][][] points = {{{100,200,300},{120,200},{200,250}}};

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.