枚举
#include<stdio.h>void main()
{
enum boy{a,b,c,d}ting,j;
int i,t;
j=a;
for(i=1;i<=30;i++)
{
ting=j;
j++;
if(j>d)
{
j=a;
}
}
for(i=1;i<=30;i++)
{
switch(ting)
{
case a:printf("%4d %s\t",i,"a");
break;
case b:printf("%4d %s\t",i,"b");
break;
case c:printf("%4d %s\t",i,"c");
break;
case d:printf("%4d %s\t",i,"d");
break;
default: break;
}
}
printf("\n\n");
} j++编译不通过 陈9803 发表于 2018-8-5 16:09
j++编译不通过
no 'operator++(int)' declared for postfix '++' [-fpermissive]
页:
[1]