Unknown type name class

后端 未结 2 1824
深忆病人
深忆病人 2020-12-18 19:21

I have the following header files:

https://gist.github.com/wemakeweb/5501443 and the compiler always reports \"Unknown Type name Class\". I have inc

相关标签:
2条回答
  • 2020-12-18 20:02

    You have at least one cyclic include dependency between Feld.h and Figur.h. The forward declarations have no effect if you also include the headers. Just remove the includes.

    0 讨论(0)
  • 2020-12-18 20:10

    This error? error: unknown type name ‘class’

    You're probably compiling it as C rather than C++.

    Make sure your source file has a .cpp extension, and than any relevant compiler flags are set correctly. (It helps if you include the exact error message and line numbers. Don't try and retype, just cut+paste.)

    0 讨论(0)
提交回复
热议问题