C++ #include guards

后端 未结 8 711
鱼传尺愫
鱼传尺愫 2020-11-22 13:24

SOLVED

What really helped me was that I could #include headers in the .cpp file with out causing the redefined error.


I\'m new to C++ but I have some p

8条回答
  •  死守一世寂寞
    2020-11-22 13:40

    The issue is that your GameObject.h does not have guards, so when you #include "GameObject.h" in Physics.h it gets included when GameObject.h includes Physics.h.

提交回复
热议问题