求问以下程序哪里错了
#include "stdio.h"int main()
{
char bin[]="00000000";
char ch;
int i,ascii;
printf("Decimal\tBinary\t\tChar\n");
for (ascii=0;ascii< 128; ascii++)
{
for (i = 0; i < 8; i++)
bin[i]='0';
ch=ascii;
i=7;
while(ch)
{
if(ch%2==1)
bin[i]='1';
i--;
ch/=2;
}
printf("%d\t%s\t%c\n",ascii,bin,ascii);
}
return 0;
}
在bin【i】那里总是提示invalid conversion