![]() |
#2
lucky5635912011-08-19 09:52
|

#include <iostream>
using std::cout;
using std::cin;
using std::endl;
class Remo {
public:
Remo(int xx,int yy) {
x=xx;
y=yy;
}
Remo(const Remo& temp);
int GetX() {
return x;
}
int GetY() {
return y;
}
private:
int x;
int y;
};
int main() {
int x,y;
Remo frist(1,2);
Remo second=frist;
x=second.GetX();
y=second.GetY();
cout << x << endl;
cout << y << endl;
return 0;
} /*不知道为什么会出错,编译的时候通过了,链接的时候怎么都通不过*/
using std::cout;
using std::cin;
using std::endl;
class Remo {
public:
Remo(int xx,int yy) {
x=xx;
y=yy;
}
Remo(const Remo& temp);
int GetX() {
return x;
}
int GetY() {
return y;
}
private:
int x;
int y;
};
int main() {
int x,y;
Remo frist(1,2);
Remo second=frist;
x=second.GetX();
y=second.GetY();
cout << x << endl;
cout << y << endl;
return 0;
} /*不知道为什么会出错,编译的时候通过了,链接的时候怎么都通不过*/