回复: 请教一个头文件的问题
#6 [igoo 07-21 11:57]
如果如果是工程文件很多有可能是文件包含的次序问题
大不了自己写一个abs
typedef unsigned int int32;
int32 abs(int i)
{
if(i
#7 [donylnx 07-21 12:01]
谢谢你的回复,可是我不知道它问题出在哪总是不舒服,就想搞明白一下,
#8 [stylev 07-21 14:25]
#include
using namespace std;
int main(int argc, char **argv)
{
//abs()......试试
#9 [donylnx 07-21 15:18]
不行呀,改过了是这样的错误: make
g++-c -I/root/qt-2.3.7/include -pipe -DQWS -fno-exceptions -fno-rtti -O2 -fno-default-inline -Wall -W -DNO_DEBUG-o showimg.o showimg.cpp
showimg.cpp: In member function `bool ImageViewer::Fenge()':
showimg.cpp:173: call of overloaded `abs(int)' is ambiguous
/usr/include/c++/3.2.2/cmath:87: candidates are: double std::abs(double)
/usr/include/c++/3.2.2/cmath:91: float std::abs(float)
/usr/include/c++/3.2.2/cmath:95: long double std::abs(long
double)