vt100背景颜色和字体颜色问题
各位大神,帮忙看看这段代码有何问题,为什么不能显示不同的颜色?#include<stdio.h>
#include<string.h>
int main()
{
int i;
char *color[8] = {"black","dark red","green","yellow","blue","purple","dark green","white"};
printf("press any key to change color\n");
for(i = 40;i <= 47;i++)
{
printf("\033[i;(i-10)m");
printf("the color you have chosen is %s\n",color[i-40]);
printf("\033[0m");
}
return 0;
}