for(int i = 0;i<10;i++)这样写循环时可能会出现如题编译错误,解决方法有两种,如下: 1 将文件后缀名由".c"改为".cpp" 2 int i; for(i=0;i<10;i++)