Circular dependencies with headers. Using #ifndef and #define

后端 未结 3 1640
后悔当初
后悔当初 2021-01-16 03:55

I have the very simple following code:

main.cpp

#include \"ui_library_browser.h\"
#include 
#include \"StartWindow.h\"
int          


        
3条回答
  •  不要未来只要你来
    2021-01-16 04:27

    Do you use StartWindow in MainWindow? If not, simply remove the StartWindow.h include. Otherwise make the main_window a pointer instead of a variable.

提交回复
热议问题