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.