【发布时间】:2012-10-31 22:58:15
【问题描述】:
以下代码只是我的头文件的一部分
double calculateDistance(const wp, &CWaypoint);
void print(int format);
bool less(wp_right, const &CWaypoint);
CWaypoint add(wp_right, const &CWaypoint);
错误是:
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o src\Waypoint.o ..\src\Waypoint.cpp
In file included from ..\src\Waypoint.cpp:15:0:
..\src\/Waypoint.h:45:33: error: 'wp' does not name a type
..\src\/Waypoint.h:45:33: error: ISO C++ forbids declaration of 'parameter' with no type
..\src\/Waypoint.h:47:12: error: 'wp_right' has not been declared
..\src\/Waypoint.h:48:16: error: 'wp_right' has not been declared
附: : 我是 C++ 初学者
【问题讨论】:
-
您的标题仅显示部分错误消息。请在您的问题正文中向我们展示整个消息。
-
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o src\Waypoint.o ..\src\Waypoint.cpp 在 ..\src\Waypoint.cpp 包含的文件中:15:0: ..\src\/Waypoint.h:45:33: 错误:'wp' 没有命名类型 ..\src\/Waypoint.h:45:33: 错误:ISO C++ 禁止声明'parameter' 没有类型 ..\src\/Waypoint.h:47:12: 错误: 'wp_right' 没有被声明 ..\src\/Waypoint.h:48:16: 错误: 'wp_right' 没有被宣布
标签: c++ syntax-error