C++ error: Invalid use of incomplete type …

后端 未结 3 1683
余生分开走
余生分开走 2021-01-05 05:26

I have a small- to medium-size project that I am doing for my software engineering course this semester. I have chosen to do it in C++ (gtkmm). I am doing okay so far but I

3条回答
  •  渐次进展
    2021-01-05 05:50

    To fix the error you should replace #include "Login_Dialog.h" with forward declaration of Login_Dialog class in Main_Window.h. Then include Login_Dialog.h in Main_Window.cpp and Main_Window.h in Login_Dialog.cpp. BTW, the same can be done for many other files/classes.

提交回复
热议问题