Chinaunix首页 | 论坛 | 博客
  • 博客访问: 355133
  • 博文数量: 79
  • 博客积分: 1270
  • 博客等级: 中尉
  • 技术积分: 1370
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-12 08:48
个人简介

freedom~~~~~~~~~~

文章分类

全部博文(79)

文章存档

2014年(10)

2013年(2)

2012年(13)

2011年(54)

分类: LINUX

2011-08-23 11:06:06

enum hello
实际上就是定义hello是一个int型,便于记忆或其他好处,这样可以把它和其他字符联系起来
如:
  1. #include<stdio.h>
  2. #include<stdlib.h>

  3. enum hello
  4. {
  5.     hello1=8,
  6.     hello2,
  7.     hello3,
  8.     hello4
  9. };

  10. int main()
  11. {
  12.     enum hello myhello=hello4;
  13.     printf("%d",myhello);
  14. }
阅读(829) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~