头文件中有这句: QMainComThread(QString name, const PortSettings *settings);
cpp文件中
QMainComThread::QMainComThread(QString name, const PortSettings *settings)
{
comsettings = new PortSettings();
*comsettings = *settings;
comname = name;
comport = NULL;
} 但是提示错误 ISO C++ forbids declaration of 'PortSettings' with no type
expected ',' or '...' before '*' token
return type specification for constructor invalid 求解。。。
------解决方案--------------------
PortSettings类的头文件没有包含?
------解决方案--------------------
头文件你的类后面加“;”没
------解决方案--------------------
在头文件类之前加上 class PortSettings;试试