您的位置:首页 > 移动开发 > IOS开发

enum相当于定义一个常量,为何在iosbase中偏要在其外定义

2010-11-27 20:22 453 查看
Code:

enum _Fmtflags

{ // constants for formatting options

_Fmtmask = 0xffff, _Fmtzero = 0

};



static const _Fmtflags skipws = (_Fmtflags)_IOSskipws;

static const _Fmtflags unitbuf = (_Fmtflags)_IOSunitbuf;

static const _Fmtflags uppercase = (_Fmtflags)_IOSuppercase;

static const _Fmtflags showbase = (_Fmtflags)_IOSshowbase;

static const _Fmtflags showpoint = (_Fmtflags)_IOSshowpoint;

后面定义的都是_Fmtflags 何,要定义在外面,定义在里面不是很好吗?
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: