hello,in BattleTank game i’m having problem with this line of code:
GetControlledTank()->AimAt(GetPlayerTank()->GetActorLocation());
i have an error on GetControlledTank() that says:
the object has type qualifiers that are not compatible with the member function ATank::AimAt().
i tried googling it and finally found out that const objects can only invoke const member functions and then i tried to declare AimAt() method definition as const,but it’s still no use and i still get the same error.only when i remove const keyword in GetControlledTank() definition the code compiles with no error.anyway, i haven’t seen Ben having such an issue when he was implementing this.any idea what the problem is?
Thanks in advance!