テストプログラムを作ったんですがうまく動きません 助けて
#include<iostream>
using namespace std;

class cord{
public:
int x,y;
cord operator+(cord o);
cord(int i=0,int x=0){x=i,y=x;} };
cord cord::operator+(cord o) {
cord tem;
tem.x=x+o.x; tem.y=y+o.y;
o.x=0; return tem; }
int main(){
cord w(1,1),r(9,1),o;
o=w+r;
cout<<o.x<<','<<o.y<<"ここまでテキスト\n";
cout<<r.x;
char p;
while(p=getchar()!='o');
return 0; }
コンパイルは通るんですが計算の実行結果が意味不明なので原因を教えてください
<<実行結果>>
-1717986920,10ここまでテキスト
-858993460