| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 203 人关注过本帖
标题:读入文件
只看楼主 加入收藏
七叶草
Rank: 2
等 级:论坛游民
帖 子:19
专家分:30
注 册:2012-2-7
结帖率:33.33%
收藏
 问题点数:0 回复次数:0 
读入文件
FORWARD_TEXT_FORMAT_1.0
STDEP =  1700.0000
ENDEP =  1938.0000
RLEV  =     0.1250
CURVENAME =  RLLS, RT, SP, GR, CALI, NPHI, RHOB, CALC, CL, CNLC, DENC
END
#DEPTH          RLLS         RT         SP         GR       CALI       NPHI       RHOB       CALC         CL       CNLC       DENC
1700.0000       1.955      1.791      4.480    141.460     14.629     39.435      2.314      0.000     94.508      0.000      0.000
1700.1250       1.957      1.753      4.472    139.974     14.561     41.401      2.320      0.000     94.454      0.000      0.000
1700.2500       1.959      1.711      4.463    141.182     14.492     42.230      2.327      0.000     95.217      0.000      0.000
1700.3750       1.995      1.821      4.454    142.442     14.482     42.181      2.327      0.000     95.561      0.000      0.000
1700.5000       2.047      1.763      4.448    140.985     14.395     42.226      2.343      0.000     96.131      0.000      0.000
1700.6250       2.045      1.702      4.451    139.444     14.427     41.623      2.366      0.000     94.433      0.000      0.000
1700.7500       2.076      1.861      4.473    132.850     14.492     41.677      2.377      0.000     82.992      0.000      0.000
1700.8750       2.094      1.862      4.493    132.806     14.577     42.394      2.384      0.000     82.919      0.000      0.000
1701.0000       2.119      1.796      4.470    133.587     14.673     41.993      2.387      0.000     84.218      0.000      0.000
1701.1250       2.121      1.850      4.458    131.643     14.687     41.562      2.384      0.000     81.011      0.000      0.000
1701.2500       2.106      1.938      4.464    129.511     14.767     41.740      2.389      0.000     77.595      0.000      0.000
上面是txt文件。怎么把前面的字符读入字符串,并且每行给一个字符串,然后后面的数据赋给数组。求解!!!
2012-05-12 17:28
快速回复:读入文件
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021797 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved