Had some issues in my code recently surrounding what I now know of as a Circular dependency. In short there are two classes, Player and Ball, which both need to use informat
Player.cpp require the definition of Ball class. So simply add #include "Ball.h"
Player.cpp
Ball
#include "Ball.h"
Player.cpp:
#include "Player.h" #include "Ball.h" void Player::doSomething(Ball& ball) { ball.ballPosX += 10; // incomplete type error occurs here. }