从Frame类中访问View类中的变量?

在frame中访问view类中的变量时,需要在frame的cpp中加入view的头文件。但经常会出现以下错误:

1)   myview.h(21)   :   error   C2143:   syntax   error   :   missing   ';'   before   '*'
2)   myview.h(21)   :   error   C2501:   'MyDoc'   :   missing   storage-class   or   type       specifiers
3)   myview.h(21)   :   error   C2501:   'GetDocument'   :   missing   storage-class   or   type   specifiers

 这个错误发生在view类的头文件中。

解决方法就是在view类的头文件中包含doc的头文件。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章