#include
using namespace std;
class CMax {
private:
int xx; int yy;
public:
CMax(int x,int y)
{ xx = x;yy = y ; }
void setValue(int x,int y)
{ xx = x;yy = y;}
int max( ){
return xx > yy? xx:yy;
}
};
void main( ){
CMax m( );
m.setValue(20,30);
cout <<″Max=″<<m.max( )<<endl;
}
人到中年有点甜
相关分类