Chinaunix首页 | 论坛 | 博客

分类: C/C++

2012-05-06 10:05:56

  1 #include
  2 #include
  3 int main()
  4 {
  5     enum color{red,yellow,blue,white,black};
  6     printf("%d\n",(color)red);
  7     return 0;
  8 }
以上这个程序在c语言当中不能编译通过,但在c++当中却可以,打印出0.
阅读(629) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~