本人用vc++做c++语言的学习,对vc++不太了解,具体图片
http://www.ky165.com/1.jpg#include "stdafx.h"
#include "iostream.h"
template <typename T>
T abs(T x)
{
return x<0? -x:x;
}
void main()
{ int n=5;
double d=-5.5;
cout<<abs(n)<<endl; //出现问题
cout<<abs(d)<<endl;}
http://www.ky165.com/1.jpg#include "stdafx.h"
#include "iostream.h"
template <typename T>
T abs(T x)
{
return x<0? -x:x;
}
void main()
{ int n=5;
double d=-5.5;
cout<<abs(n)<<endl; //出现问题
cout<<abs(d)<<endl;}
可能你需要Rebuild ALL一下