编译时出现 “符号不能用在 using 声明中”; “不是“`global namespace'”的成员”

gisqimeng 2008-11-08 10:36:40
c:\program files\microsoft visual studio 8\vc\include\cmath(18) : error C2873: “acosf”: 符号不能用在 using 声明中
c:\program files\microsoft visual studio 8\vc\include\cmath(18) : error C2039: “asinf”: 不是“`global namespace'”的成员
c:\program files\microsoft visual studio 8\vc\include\cmath(18) : error C2873: “asinf”: 符号不能用在 using 声明中
c:\program files\microsoft visual studio 8\vc\include\cmath(19) : error C2039: “atanf”: 不是“`global namespace'”的成员
c:\program files\microsoft visual studio 8\vc\include\cmath(19) : error C2873: “atanf”: 符号不能用在 using 声明中
c:\program files\microsoft visual studio 8\vc\include\cmath(19) : error C2039: “atan2f”: 不是“`global namespace'”的成员
c:\program files\microsoft visual studio 8\vc\include\cmath(19) : error C2873: “atan2f”: 符号不能用在 using 声明中
c:\program files\microsoft visual studio 8\vc\include\cmath(19) : error C2039: “ceilf”: 不是“`global namespace'”的成员
c:\program files\microsoft visual studio 8\vc\include\cmath(19) : error C2873: “ceilf”: 符号不能用在 using 声明中
c:\program files\microsoft visual studio 8\vc\include\cmath(20) : error C2039: “cosf”: 不是“`global namespace'”的成员
c:\program files\microsoft visual studio 8\vc\include\cmath(20) : error C2873: “cosf”: 符号不能用在 using 声明中
...全文
2763 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
flow1100 2010-06-02
  • 打赏
  • 举报
回复
看一下你的工程中是否存在和系统同名的头文件
一条晚起的虫 2008-11-09
  • 打赏
  • 举报
回复
有这句?
using namespaces std;

//那么请
#include <cmath>
gisqimeng 2008-11-09
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 cnzdgs 的回复:]
头文件是怎么包含的?
[/Quote]
头文件是中 #include<cmath.h>
cnzdgs 2008-11-08
  • 打赏
  • 举报
回复
头文件是怎么包含的?
ouyh12345 2008-11-08
  • 打赏
  • 举报
回复
using std::string;

找一下acosf是那个命名空间的
一条晚起的虫 2008-11-08
  • 打赏
  • 举报
回复
贴出出错的的代码,好像是namespaces用错了

2,640

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧