到底是怎么了?高手?
#include "iostream.h";
class demo{
int x,y;
public:demo(int a,int b)
{ x=a,y=b;
cout<<"demo(int,int) be called";
}
demo()
{ cout<<"demo() be called; }
void show()
{ cout<<"x="<<x<<"y="y<<endl; }
};
//demo d2;
void main()
{ demo d1(3,5);
d1.show();
*请问这时候的d2.show的输出是什么?
如果将demo d2 放在类的申明和 主函数main之间
d2.show输出什么?*
demo d2;
d2.show();
}