【发布时间】:2015-11-29 02:23:20
【问题描述】:
我有多个名为 sensor0.txt、sensor1.txt、sensor2.txt 等的文件。我需要打开这些文件,对它们进行计算,然后将它们打印在屏幕上。
所以我想到了类似的东西,
for(i = 0; i < N/*(Number of files)*/; i++)
{
fpointer = fopen(/*not sure how to format this*/)
//calculations I need to perform with said file
//Print results of calculations on the screen
}
我无法找到直接的解决方案。这甚至可能吗?或者我必须创建一些数组并存储所有信息,然后使用所有所述存储信息进行计算。
【问题讨论】: