每行数据为33个,都为double数据,如何取出每列的数据,每列数据各存放一个数组中,每个txt文档大小不一样,有几千行的,也有几百行的,要取出的数据都为double 小数后6位!给出完整代码给高分!
比如数据为:
0 1.123456 2.454646 2.1213142 3.223132321 2.1213131
0.001 1.133456 2.254646 1.121314 1.223131 1.1313131
0.002 2.133456 1.25464623 3.12131423 1.2311312 3.1313131
0.003 3.133456 2.234646 -1.1213142 10.22313123 -11.1313131
0.004 4.233456 3.234646 -11.121314 10.523131 -1.1313131
0.005 13.133456 -2.234646 -1.521314 -1.223131 10.3413131
0.006 -3.133456 -1.234646 -11.121314 -10.223131 -2.3313131
0.007 3.8396266 2.1358943 6.12584331 4.223131 -1.3524564
0.008 13.13342356 12.234646 -11.423514 8.423131 -5.4313131
0.009 2.234456 -2.235323646 -10.23132314 11.22453231 -10.2323131
0.010 4.256456 -2.344646 -1.368314 8.232255131 -2.1313131
。。。。。。。。。
C语言中 如何取出字符串中俩空格之间的字符
追答有现成的函数可以用呀.
char * strtok(char *s, " ");