Math Dash 2024-05-13 10:56 采纳率: 92.8%
浏览 11
已结题

多个头文件怎么引用同一个头文件的代码?

将多个头文件放在了一个头文件里,却出现



```c++
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\classptr.h(6): error C2182: “free”: “void” 这一使用无效
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\classptr.h(6): error C2065: “QVBoxLayout”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\classptr.h(6): error C2059: 语法错误:“)”
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\classptr.h(7): error C2182: “free”: “void” 这一使用无效
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\classptr.h(7): error C2374: “classptr::free”: 重定义;多次初始化
  E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\classptr.h(6): note: 参见“classptr::free”的声明
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\classptr.h(7): error C2065: “QHBoxLayout”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\classptr.h(7): error C2059: 语法错误:“)”
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\classptr.h(9): error C2365: “classptr::free”: 重定义;以前的定义是“数据变量”
  E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\classptr.h(6): note: 参见“classptr::free”的声明
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\classptr.h(10): fatal error C1907: 无法从以前的错误中恢复;正在停止编译
  [3/6] Building CXX object CMakeFiles\untitled11.dir\qobjecttext.cpp.obj
  FAILED: CMakeFiles/untitled11.dir/qobjecttext.cpp.obj 
  C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1439~1.335\bin\Hostx64\x64\cl.exe  /nologo /TP -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DUNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -IE:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\out\build\x64-Debug\untitled11_autogen\include -external:IC:\Qt\6.8.0\msvc2019_64\include\QtCore -external:IC:\Qt\6.8.0\msvc2019_64\include -external:IC:\Qt\6.8.0\msvc2019_64\mkspecs\win32-msvc -external:IC:\Qt\6.8.0\msvc2019_64\include\QtWidgets -external:IC:\Qt\6.8.0\msvc2019_64\include\QtGui -external:W0 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 -std:c++17 -Zc:__cplusplus -permissive- -utf-8 /showIncludes /FoCMakeFiles\untitled11.dir\qobjecttext.cpp.obj /FdCMakeFiles\untitled11.dir\ /FS -c E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(21): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(21): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(21): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(22): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(22): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(22): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(23): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(23): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(23): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(24): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(24): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(24): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(25): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(25): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(25): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(26): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(26): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(26): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(27): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(27): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(27): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(28): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(28): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(28): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(29): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(29): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(29): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(9): error C2065: “ptrdel_centralwidget”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(9): error C2065: “shared_ptr”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(9): error C2275: “QWidget”: 应为表达式而不是类型
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(10): error C2065: “ptrdel_layoutWidget”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(10): error C2065: “shared_ptr”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(10): error C2275: “QWidget”: 应为表达式而不是类型
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(11): error C2065: “ptrdel_verticalLayout”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(11): error C2065: “shared_ptr”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(11): error C2275: “QVBoxLayout”: 应为表达式而不是类型
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(12): error C2065: “ptrdel_label_class”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(12): error C2065: “shared_ptr”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(12): error C2275: “QLabel”: 应为表达式而不是类型
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(13): error C2065: “ptrdel_textEdit”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(13): error C2065: “shared_ptr”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(13): error C2275: “QTextEdit”: 应为表达式而不是类型
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(14): error C2065: “ptrdel_horizontalLayout”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(14): error C2065: “shared_ptr”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(14): error C2275: “QHBoxLayout”: 应为表达式而不是类型
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(15): error C2065: “ptrdel_clear”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(15): error C2065: “shared_ptr”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(15): error C2275: “QPushButton”: 应为表达式而不是类型
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(16): error C2065: “ptrdel_objlist”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(16): error C2065: “shared_ptr”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(16): error C2275: “QPushButton”: 应为表达式而不是类型
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(17): error C2065: “ptrdel_menubar”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(17): error C2065: “shared_ptr”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.cpp(17): error C2275: “QMenuBar”: 应为表达式而不是类型
  [4/6] Building CXX object CMakeFiles\untitled11.dir\mainwindow.cpp.obj
  FAILED: CMakeFiles/untitled11.dir/mainwindow.cpp.obj 
  C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1439~1.335\bin\Hostx64\x64\cl.exe  /nologo /TP -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DUNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -IE:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\out\build\x64-Debug\untitled11_autogen\include -external:IC:\Qt\6.8.0\msvc2019_64\include\QtCore -external:IC:\Qt\6.8.0\msvc2019_64\include -external:IC:\Qt\6.8.0\msvc2019_64\mkspecs\win32-msvc -external:IC:\Qt\6.8.0\msvc2019_64\include\QtWidgets -external:IC:\Qt\6.8.0\msvc2019_64\include\QtGui -external:W0 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 -std:c++17 -Zc:__cplusplus -permissive- -utf-8 /showIncludes /FoCMakeFiles\untitled11.dir\mainwindow.cpp.obj /FdCMakeFiles\untitled11.dir\ /FS -c E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(55): error C2143: 语法错误: 缺少“;”(在“*”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(55): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(55): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(57): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(57): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(57): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(58): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(58): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(58): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(59): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(59): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(59): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(60): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(60): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(60): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(61): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(61): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(61): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(62): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(62): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(62): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(63): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(63): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(63): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(64): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(64): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(64): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(65): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(65): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(65): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(66): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(66): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(66): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(67): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(67): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(67): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(68): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(68): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(68): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(69): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(69): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(69): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(70): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(70): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(70): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(71): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(71): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(71): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(72): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(72): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(72): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(73): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(73): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(73): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(74): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(74): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(74): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(75): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(75): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(75): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(76): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(76): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(76): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(77): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(77): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(77): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(78): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(78): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(78): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(79): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(79): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(79): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(80): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(80): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(80): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(81): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(81): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(81): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(82): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(82): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(82): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(83): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(83): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(83): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(84): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(84): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(84): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(85): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(85): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(85): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(86): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(86): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(86): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(87): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(87): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(87): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(88): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(88): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(88): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(89): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(89): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(89): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(90): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(90): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(90): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(91): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(91): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(91): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(92): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(92): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(92): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(93): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(93): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(93): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(94): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(94): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(94): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(95): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(95): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(95): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(96): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(96): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(96): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(97): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(97): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(97): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(98): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(98): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(98): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(7): error C2061: 语法错误: 标识符“QObjecttext”
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(7): error C2614: “MainWindow”: 非法的成员初始化:“object”不是基或成员
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(19): error C2065: “object”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(19): error C2065: “object”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(20): error C2065: “object”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(21): error C2065: “object”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(25): error C2065: “object”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(26): error C2065: “ptrdel_centralwidget”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(26): error C2065: “shared_ptr”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(26): error C2275: “QWidget”: 应为表达式而不是类型
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(27): error C2065: “ptrdel_layoutWidget”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(27): error C2065: “shared_ptr”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(27): error C2275: “QWidget”: 应为表达式而不是类型
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(28): error C2065: “ptrdel_verticalLayout_5”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(28): error C2065: “shared_ptr”: 未声明的标识符
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.cpp(28): fatal error C1003: 错误计数超过 100;正在停止编译
  [5/6] Building CXX object CMakeFiles\untitled11.dir\untitled11_autogen\mocs_compilation.cpp.obj
  FAILED: CMakeFiles/untitled11.dir/untitled11_autogen/mocs_compilation.cpp.obj 
  C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1439~1.335\bin\Hostx64\x64\cl.exe  /nologo /TP -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DUNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64 -IE:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\out\build\x64-Debug\untitled11_autogen\include -external:IC:\Qt\6.8.0\msvc2019_64\include\QtCore -external:IC:\Qt\6.8.0\msvc2019_64\include -external:IC:\Qt\6.8.0\msvc2019_64\mkspecs\win32-msvc -external:IC:\Qt\6.8.0\msvc2019_64\include\QtWidgets -external:IC:\Qt\6.8.0\msvc2019_64\include\QtGui -external:W0 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 -std:c++17 -Zc:__cplusplus -permissive- -utf-8 /showIncludes /FoCMakeFiles\untitled11.dir\untitled11_autogen\mocs_compilation.cpp.obj /FdCMakeFiles\untitled11.dir\ /FS -c E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\out\build\x64-Debug\untitled11_autogen\mocs_compilation.cpp
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(55): error C2143: 语法错误: 缺少“;”(在“*”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(55): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(55): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(57): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(57): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(57): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(58): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(58): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(58): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(59): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(59): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(59): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(60): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(60): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(60): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(61): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(61): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(61): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(62): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(62): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(62): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(63): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(63): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(63): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(64): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(64): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(64): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(65): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(65): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(65): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(66): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(66): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(66): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(67): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(67): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(67): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(68): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(68): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(68): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(69): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(69): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(69): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(70): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(70): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(70): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(71): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(71): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(71): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(72): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(72): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(72): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(73): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(73): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(73): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(74): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(74): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(74): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(75): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(75): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(75): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(76): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(76): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(76): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(77): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(77): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(77): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(78): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(78): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(78): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(79): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(79): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(79): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(80): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(80): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(80): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(81): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(81): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(81): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(82): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(82): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(82): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(83): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(83): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(83): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(84): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(84): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(84): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(85): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(85): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(85): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(86): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(86): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(86): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(87): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(87): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(87): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(88): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(88): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(88): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(89): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(89): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(89): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(90): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(90): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(90): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(91): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(91): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(91): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(92): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(92): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(92): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(93): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(93): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(93): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(94): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(94): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(94): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(95): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(95): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(95): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(96): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(96): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(96): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(97): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(97): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(97): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(98): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(98): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\mainwindow.h(98): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(21): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(21): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(21): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(22): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(22): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(22): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(23): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(23): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(23): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(24): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(24): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(24): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(25): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(25): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(25): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(26): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(26): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(26): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(27): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(27): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(27): error C2238: 意外的标记位于“;”之前
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(28): error C2143: 语法错误: 缺少“;”(在“<”的前面)
E:\Math_Dash_s_Data\Math_Dash\New_Project\Windows\untitled11\qobjecttext.h(28): fatal error C1003: 错误计数超过 100;正在停止编译
  ninja: build stopped: subcommand failed.


```

  • 写回答

3条回答 默认 最新

  • 笑面虎 2024-05-13 10:56
    关注

    以下内容由CHATGPT及笑面虎共同生成、有用望采纳:


    【您想要解决的问题】: 您想要解决的问题是如何在C++项目中正确引用和包含多个头文件中的代码,同时解决由于代码错误导致的编译失败问题。

    【问题出现原因】: 问题出现的原因是多方面的,根据您提供的错误信息,可以归纳为以下几点:

    1. 头文件中可能存在语法错误,如缺少分号、类型说明符等。
    2. 您可能没有正确包含或声明所需的Qt类和函数,如QVBoxLayoutQHBoxLayout等。
    3. 代码中存在重复定义,如classptr::free被多次初始化。
    4. 您的代码中使用了shared_ptr,但没有包含相应的头文件#include <memory>

    【问题解决方案】:

    1. 确保所有头文件中的类和函数都有正确的语法,包括分号、类型说明符等。
    2. 确保所有需要的Qt类和函数都已通过Qt的头文件正确包含。
    3. 避免重复定义,每个函数和变量应该只在一个头文件中定义一次。
    4. 如果您使用了智能指针shared_ptr,请确保包含了C++标准库中的<memory>头文件。
    5. 检查是否有未定义的标识符,这通常是由于缺少相应的头文件或者拼写错误。

    【提供代码】: 由于您没有提供具体的代码片段,我只能提供一些通用的解决方案和代码范例:

    // 确保包含了所需的Qt头文件
    #include <QVBoxLayout>
    #include <QHBoxLayout>
    #include <QLabel>
    #include <QTextEdit>
    #include <QPushButton>
    #include <QMenuBar>
    #include <memory> // 对于std::shared_ptr
    
    // 例子:使用std::shared_ptr
    std::shared_ptr<QWidget> ptr(new QWidget());
    
    // 例子:定义一个类成员变量
    class MyClass {
    public:
        QVBoxLayout* myLayout; // 注意这里不需要shared_ptr,除非您有特殊的需求
        // ...
    };
    
    // 确保您的类定义和函数实现是正确的,没有重复定义或者语法错误
    

    【代码运行方式】: 您需要有一个支持C++和Qt开发的集成开发环境(IDE),如Qt Creator,并且已经配置了Qt SDK。将上述代码放入相应的.cpp.h文件中,然后使用Qt Creator构建和运行您的项目。

    【代码预期运行结果】: 如果代码没有语法错误,并且所有必要的头文件都已正确包含,您的项目应该能够成功编译并运行,不会出现编译错误。

    【推荐相关链接】:

    1. Qt Documentation
    2. C++ std::shared_ptr Documentation
    3. C++ Reference
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 5月25日
  • 已采纳回答 5月17日
  • 创建了问题 5月13日