Need help with Class pointers

mrchimp

Newbie
Joined
Jul 19, 2003
Messages
1,928
Reaction score
0
ans3 = *cShips[n]->Destroyed(ans2);

That line of code gives the error warning:
invalid type argument of `unary *'

ans3 and ans2 are bools, cShips is an array of pointers pointing to instances of the class Ship, Destroyed is a function in the Class Ship.

The array works when I'm trying to assighn values to variables of the selected object but it won't work with this function, do I have to do something special to make it work?

If people want me to I'll post the entire source code as it's just a learning project anyway.
 
I don't ****ing believe it, I had put a * there when it wasn't needed... ignor this thread.
 
Back
Top