一个c++类的举例

来源:百度知道 编辑:UC知道 时间:2024/05/26 02:28:45
四个数据,三个成员函数

这是我写的算24点的类的部分。

class TwentyFour
{
public:
~TwentyFour( );

void Init( );
void BuildPostfix( int, int );

private:
bool WorkOutPoints( );

char *postfix;

char card[ 4 ];

bool correct;
bool use[ 4 ];
bool refrain[ 9973 ];

float stack[ 7 ];
void push( char );
void push( float );
void pop( char );
int head;
};