error: must use 'class' tag to refer to type 'XX' in this scope
在写程序的时候,遇到了编译器报错 error: must use 'class' tag to refer to type 'thread' in this scope
void MainWindow::freeFreightUi(){
freeFreight *free = new freeFreight(this);
}
需要指明是是一个类。
修改如下:
void MainWindow::freeFreightUi(){
class freeFreight *free = new class freeFreight(this);
}