为什么我用printf("The list of the scense is:\n") 它怎么没显示完全
我有这么一段代码,
void List()
{
printf("the list of the scense: \n");
for(i=1;i<G->vexNum;i++)
printf("%s\n",G->v[i].name);
}
G->v[i].name 是我从键盘输入的字符串。
比如我输入 :1 2 3 4 5
为什么输出信息为:
the lis1
2
3
4
5
怎么printf("The list of the scense:\n");
没显示完,还有就是 “\n" 怎么没起作用?
参考答案:这里应该没问题,可能是其他地方
把程序整个帖上来