Header File:-
CPP File:-
Problem:- In the CPP file at line no. 35 and 38, compiler is giving error, that identifier ‘CannonComp’ is undefined. But I already declared CannonComp in the header file. It seems that I did a silly mistake in my code or my compiler is high.
Include this header file in you .cpp
#include “Components/StaticMeshComponent.h”
Then in BasePawn.h in line 36 add “class” before “UStaticMeshComponent*” Hope, that should fix your problem
Still have the same error.
Actually, I forgot to add ABasePawn:: in line no.33
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.