I have this code
CPoint* points;
int numPoints (200);
points = new CPoint[200];
I have another class called CPlanet, and a bunch of pointers like:
CPlanet* pSun = new CPlanet;
... and CPoint and CPlanet call the same functions, so I would like to use -> to call their functions.
pSun->Move() is ok, but for points I have to use points.Move().
The thing is I want to use -> for both the single planets and the array of points.
So I tried this, but I get a break:
CPoint** points;
int numPoints (200);
*points = new CPoint[200];
I'm just not used to double pointers being used as arrays.. can't really figure out what I'm doing wrong though..
I also tried points = new CPoint* [200] but that also gives a break...
so what should I do?
Thanks a lot,