类对象出错
程序代码:
#include <iostream> using namespace std; class A { int x,y; public: A() { x = 0; y = 0; } A(int i = 1, int j = 0) { x = i; y = j; } void show() { cout << x << ',' << y <<endl; } }; int main() { A a1 ; //编译器告诉我这里call指向模糊不清,我看书上也是这么写的,哪位高手能解释一下 A a2(3,6); a1.show(); a2.show(); return 0; }