Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Make this compile

Name: Anonymous 2010-11-08 22:38

I can't change the integers to public, just ADD something to make this compile


class X
{ private: int x;
public: X(int i){x=i;}
};

class Y{ private: int y;
public: Y(int i){y=i;}
};

int operator +(X &p1, Y &p2){return p1.x+p2.y;};

Name: Anonymous 2010-11-09 2:08

OP HERE
You really don't have to do that. In fact, it's quite obnoxious.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List