array initialization

I try to initialize an array with the max size of 100.
 
Point points[];

so I did:
 
points = new Point[100];

but Xcode keeps telling me that array type Point[] is not assignable.(Point is another class' name) need someone explain this, thank you.
If I had to take a guess it's probably because you're using the new operator on an array that has an undefined size. Try something like Point points[0]; // Initialize the SIZE of the array(or however many elements it can hold) to zero. Then again you are assign an array size to a class which could be the problem.
Last edited on
Topic archived. No new replies allowed.