VS2017 error C2143: 语法错误: 缺少“;”(在“ ”的前面);error C4430: 缺少类型说明符,假定为 int;“vector”: 不明确的符号;
程序员文章站
2024-01-05 17:05:46
...
错误:写了一个.h文件,及.h的声明源代码.cpp文件,报错:
1>e:\project_file\vs\general_mesh\general_mesh\flowfield.h(10): error C2143: 语法错误: 缺少“;”(在“<”的前面)
1>e:\project_file\vs\general_mesh\general_mesh\flowfield.h(10): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\project_file\vs\general_mesh\general_mesh\flowfield.cpp(10): error C2872: “vector”: 不明确的符号
1>e:\project_file\vs\general_mesh\general_mesh\flowfield.h(10): note: 可能是“int vector”
1>d:\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\vector(625): note: 或 “std::vector”
1>e:\project_file\vs\general_mesh\general_mesh\flowfield.cpp(10): error C2143: 语法错误: 缺少“;”(在“<”的前面)
1>e:\project_file\vs\general_mesh\general_mesh\flowfield.cpp(10): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>e:\project_file\vs\general_mesh\general_mesh\flowfield.cpp(14): error C2872: “vector”: 不明确的符号
1>e:\project_file\vs\general_mesh\general_mesh\flowfield.cpp(10): note: 可能是“int vector”
1>d:\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\vector(625): note: 或 “std::vector”
1>e:\project_file\vs\general_mesh\general_mesh\flowfield.cpp(14): error C2275: “Lattice”: 将此类型用作表达式非法
1>e:\project_file\vs\general_mesh\general_mesh\lattice.h(7): note: 参见“Lattice”的声明
1>e:\project_file\vs\general_mesh\general_mesh\flowfield.cpp(14): error C2065: “lattice_temp”: 未声明的标识符
1>e:\project_file\vs\general_mesh\general_mesh\flowfield.cpp(23): error C2065: “lattice_temp”: 未声明的标识符
1>e:\project_file\vs\general_mesh\general_mesh\flowfield.cpp(25): error C2065: “lattice”: 未声明的标识符
1>e:\project_file\vs\general_mesh\general_mesh\flowfield.cpp(25): error C2065: “lattice_temp”: 未声明的标识符