CMyDoc* GetDocument() const compile-time error in MFC single document view class: missing ';' (before '*')

Transfer: https://blog.csdn.net/hanjieson/article/details/8194337

 

Cause: The header file of MyView.h is used in other classes

Solution: Before adding MyView.h, also add MyDoc.h

 

[cpp]  view plain copy  
 
  1. #include "MyDoc.h"  
  2. #include "MyView.h"  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325292376&siteId=291194637