文本数据比如下下面的用于测试
18 19 18.5 13.5 14
16 19.5 20 18 12 18.5
17.5
需要注意的是在17.5,也就是组后一个数据后面需要加一个空格,不然最后一个数据会丢弃.导致处理的数据错误
#pragma region sumafile.cpp---程序清单6.16
//程序清单6.15
//sumafile.cpp -- functions with an array argument
//提前在当前工程下建立一个文件,就是需要手输入的名字的文本
//里面可以写实几个数据做测试
#if 1
#include <iostream>
#include<fstream> //for file I/O
#include<cstdlib> //exit()
const int SIZE =