如果我有我想要输出到一个文本文件中的整数数组..Ç - 输出到文件
void output()
{
for (i=0; i<10; i++)
printf("%d ", values[i]);
}
我如何保存()的输出使用下面的方法为文本文件?
void writeToFile()
{
file = fopen("file.txt","a+"); // apend file or create a file if it does not exist
fprintf(file,"%d", *missing parameter*); // write
fclose(file); // close file
printf("File created. Located in the project folder.\n", "");
}
它是关于如何组合两个函数来遍历数组值? – stacker 2010-03-07 09:59:59
不要在人们费力回答之后删除你的问题。 – 2010-03-07 14:34:36