在.h中这样声明:
class CStage
{
public:
CStage(void);
~CStage(void);
static float key_timer;
static float countdown_timer;
};
在.cpp中这样初始化:
#include "Stage.h"
CStage::CStage(void)
{
}
CStage::~CStage(void)
{
}
float CStage::key_timer = -1.0f;
float CStage::countdown_timer = 180.0f;
没有评论:
发表评论