#include <iostream.h>
int big(int x,int y);
int main()
{
int a,b,c;
cout<<"intpu a and b";
cin>>a>>b;
c=big(a,b);
cout<<"a,b,c="<<a<<','<<b<<','<<c<<endl;
cout<<"int a and b again";
cin>>a>>b;
c=big(a,b);
cout<<"a,b,c="<<a<<','<< b<<','<<c<<endl;
return 0;
}
int big(int x,int y)
{
if(x>=y)return x;
else return y;
}
补充:将#include <iostream.h>换成#include <iostream>也不行.错误更多.
刚才在网上查了下资料.原来是dev-c++支持新的C++标准.而VS6.0对新标准支持的不够.新标准一定要加命名空间.加上using namespace std;这一句就可以了. 谢谢刚才回答我问题的朋友,虽然回答的跟我的问题不是很相关.但还是给你给你加分了.
参考资料:http://hi.baidu.com/kelvin_yin/blog/item/3f2710304c2de299a9018e4d.html