请教下面这个小程序有什么问题,怎么老是显示不能连接啊?
程序是:#include <iostream.h>
#include <math.h>
double max(double x, double y);
void main()
{
double a, b, c;
cout <<"input two numbers:\n";
cin >>a >>b;
c = max(a,b);
cout <<"the squart of maximum=" <<sqrt(c);
}
double max(double x, double y)
{
if(x > y)
return x;
else
return y;
}
编译显示:
-------------- Build: Debug in ch1_3 ---------------
Linking stage skipped (build target has no object files to link)
Nothing to be done.
我使用的是Code::Blocks10.05,难道是编译器没有iostream.h和math.h这样的标准库吗?尝试把在#include后把.h去到,也是不成。请您指点。