robot
in the Explorer
class is not a pointer, but you are trying to initialize it with the new
keyword:
robot = new PlayerClient("127.0.0.1", 6665); // this won't work
Same thing with the variable pp
.
One of the notes on an error you're getting: note: candidates are: PlayerCc::Position2dProxy::Position2dProxy(PlayerCc::PlayerClient*, uint) also suggest that the constructor needs a PlayerClient
pointer.
Try this in the Explorer class:
PlayerClient *robot;
And don't forget do delete
it when you are done with it.
An easy way to spot errors like these are looking closely at the error messages. When the error says error: base operand of ‘->’ has non-pointer type it simply means that you are trying to use the pointer operator ->
on something that is not a pointer.