issues with #includes

Hello, I’m having some trouble sorting out some #includes. My directory structure looks like this:

-- classA.h  
-- classA.cpp  
-- classB.h  
-- classB.cpp  

In testApp.h, I’m importing both classA.h and classB.h. However, I also want classA to have a pointer to classB and vice versa. When I add "#include “classB.h” to classA.h (and the opposite to classB.h) I get issues with “classA/classB has not been declared”. I’m using #pragma once at the top of all of these files as an include guard, so I would guess that this is causing my problems.

Is what I want to do frowned upon / bad form? What’s the proper way to be doing this?

it has nothing to do with the pragma once, it’s a problem called recursive inclusion, it’s solved by using forward declaration. take a look at this post, it explains how to solve it:

Thanks a lot, that worked.