无法编译我的课程。出现错误:错误:字段“文件名”的类型不完整
如果我更改QString filename
为QString *filename
,错误就会消失..但我需要QString filename
.
进程.h:
#ifndef PROCESS_H
#define PROCESS_H
#include <QString>
class Process
{
public:
int pid;
QString filename;
Process(int pid, QString filename);
};
#endif // PROCESS_H
进程.cpp:
#include "process.h"
Process::Process(int pid, QString filename)
{
this->pid = pid;
this->filename = filename;
}
怎么了?