如下,我想写个for循环,动态创建10个txt文件,如何把这个i值,动态传入?我是新手,望指教!
int main(void)
{
for (int i = 0; i < 10; i++)
{
FILE *fp = NULL;
//fp = fopen("C:\\Users\\Dell\\Desktop\\" + i + ".txt", "a");
//fputs("第个" + i + "文件",fp);
fclose(fp);
}
return 0;
}