我自定义了新类继承CSerialPort类,其中在该类我需要将处理的数据体现在界面上,因此调用另外一个对话框类的成员函数。可是我include该类后,并且定义了该类的变量,如CDlg****** m_p******。结果编译错误。错误提示如下:
error C2146: syntax error : missing ';' before identifier 'm_p*******'
error C2501: 'CDlg********' : missing storage-class or type specifiers
error C2501: 'm_p******' : missing storage-class or type specifiers试了很多方法,均编译失败
请问是什么原因呢?