7-enum枚举字函数程序案例VC.doc.pdf
《7-enum枚举字函数程序案例VC.doc.pdf》由会员分享,可在线阅读,更多相关《7-enum枚举字函数程序案例VC.doc.pdf(7页珍藏版)》请在三一文库上搜索。
1、enum instancestate (close=13open,mount,unmount); void optcl (instancestate state ) switch (state ) case close printf( n 关闭数据库 ! n“); break; case open printf(”打开数据库!n” ); break; case mount printf(”挂起数据库 ! n n); break; case unmount printf(”卸载数据库!) ; break; default; break; void main() instancestate sta
2、te=close optcl (state) Compiling. cccOl.cpp d:accc01 .cpp(1) : error C2199: syntax error: found instancestate ( at global scope (was a declaration intended?) d:accc01 .cpp(2) : error C2065: Instancestate 1 : undeclared s xn MI M MA je ei ZA 二 J * 丁 - JT 0 ? f *1 9 cccCl; wid MU 1 ll?l ?r 输入命令如下所示: i
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- enum 枚举 函数 程序 案例 VC doc
链接地址:https://www.31doc.com/p-5615522.html