[讨论]一个变量的定义
今天看一段代码时看到一个很奇怪的变量定义,其中的flg m_bSettingTime:1;(flg 是unsigned char)
不知他到底是什么意思,还请各位高人指点。
typedef struct _ClockApp {
AEEApplet a;
AEERect m_rcDisp;
IMenuCtl *m_pMenu;
ITimeCtl *m_pTime;
ClockAppState m_nState;
/*WP826:added by wenli for the alarmclock beep voice changed to MIDI 050708*/
IPhone *m_pPhone;
/*ended by wenli*/
// This is the value (in milliseconds) that will be displayed in the
// Time Control.
uint32 m_dwDispTime;
flg m_bSettingTime:1;
flg m_bActive:1;
flg m_bSuspended:1;
flg m_bHideTime:1;
flg m_bTimerActive:1;
ClockAppCfg m_cfg;
IAlert *m_pAlert;
boolean m_started; // m_started is TRUE if we have
// digital service and the timers for
// this app have been initiated.
#ifdef WORKAROUND_ITIMECTL_AMPM_FONT_BUG
ClockCtl m_clockCtl;
#endif /*WORKAROUND_ITIMECTL_AMPM_FONT_BUG*/
} ClockApp;
先谢过了。