快让人崩溃的error C2236: 意外的“class”“DiagramWindow”。是否忘记了“;”?
来源:互联网 发布:软件体系结构评估报告 编辑:程序博客网 时间:2024/05/22 01:30
myclass.cpp文件中:
DiagramWindow::DiagramWindow()
{
scene=new QGraphicsScene(0,0,600,500);
item=new NewItem();
scene->addItem(item->rectitem);
view=new QGraphicsView(scene);
view->show();
}
该类定义基本没有问题,出了最后缺了一个分号“;”,但加上去后仍然有问题。
查看另一个cpp文件:NewItem.cpp:
#include"NewItem.h"
NewItem::NewItem()
{
rectitem=new QGraphicsRectItem(100,100,100,100);
}
QRectF NewItem::boundingRect()const
{
QFont font;
QFontMetricsF metrics(font);
QRectF rect=metrics.boundingRect("hhhhhh");
return rect;
}
末未加分号,加分号后,成功编译完成。
1 0
- 快让人崩溃的error C2236: 意外的“class”“DiagramWindow”。是否忘记了“;”?
- [Bug]error C2236: 意外的“class” error C2236: unexpected 'class'
- 意外的“class”“EKFException”。是否忘记了“;”?
- error C2236: unexpected 'class'
- error C2236: unexpected 'class'
- fatal error C1010 error c2143 warning C4627: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h
- vc编程中出现 fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h"”?
- fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h
- fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h"?
- fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h
- fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h
- vs2010:fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "StdAfx.h"”?
- 错误描述:fatal error C1010:在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include"stdafx.h"”?
- fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h
- VC中的预编译:fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h"”?
- 错误描述:fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h"”?
- fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h
- fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h
- git介绍及使用教程
- Dataset.Tables[0].Select从一个Dataset中提取符合要求的数据
- arm 上电过程以及uboot
- 数据结构实验之链表四:有序链表的归并
- 2021 发工资咯:)
- 快让人崩溃的error C2236: 意外的“class”“DiagramWindow”。是否忘记了“;”?
- go database/sql 源码分析 -题外篇
- 面向对象的三大特点
- cocos lua遇到的一些问题
- 初中oj1338 泽泽在埃及
- spark 的HA模式
- rsyslog 走tcp通讯配置
- ArcGIS影像配准与空间配准
- VS2013添加使用lib的方法