| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 627 人关注过本帖
标题:求解c++习题,刚学不怎么会~
只看楼主 加入收藏
沐凝
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2015-10-12
结帖率:0
收藏
已结贴  问题点数:20 回复次数:4 
求解c++习题,刚学不怎么会~
下面是一个文本文件data.txt中的内容。(第一行为字段名称,其后每行对应一行数据;)
  要求: 读取文本文件,编写一个基于控制台程序的查找系统;
         使用类和对象;
         输入居民点名称、拼音,查找其相关信息;
         输入ADCLASS,查找该class下的所有居民点

AREA,PERIMETER,RES2_4M_,RES2_4M_ID,GBCODE,NAME,ADCODE93,ADCODE99,ADCLASS,PINYIN
0.000000000000000,0.000000000000000,1.000000000000000,1.000000000000000,31030,景德镇,360201,360201,3,Jingdezhen
0.000000000000000,0.000000000000000,2.000000000000000,4.000000000000000,31030,白银,620401,620401,3,Baiyin
0.000000000000000,0.000000000000000,3.000000000000000,61.000000000000000,31010,北京,110100,110100,1,Beijing
0.000000000000000,0.000000000000000,4.000000000000000,70.000000000000000,31020,天津,120100,120100,2,Tianjin
0.000000000000000,0.000000000000000,5.000000000000000,78.000000000000000,31030,唐山,130201,130201,3,Tangshan
0.000000000000000,0.000000000000000,6.000000000000000,86.000000000000000,31030,秦皇岛,130301,130301,3,Qinhuangdao
0.000000000000000,0.000000000000000,7.000000000000000,91.000000000000000,31030,张家口,130701,130701,3,Zhangjiakou
0.000000000000000,0.000000000000000,8.000000000000000,93.000000000000000,31030,承德,130801,130801,3,Chengde
0.000000000000000,0.000000000000000,9.000000000000000,95.000000000000000,31030,廊坊,131001,131001,3,Langfang
0.000000000000000,0.000000000000000,10.000000000000000,121.000000000000000,31020,石家庄,130101,130101,2,Shijiazhuang
0.000000000000000,0.000000000000000,11.000000000000000,126.000000000000000,31030,邯郸,130401,130401,3,Handan
0.000000000000000,0.000000000000000,12.000000000000000,128.000000000000000,31030,邢台,130501,130501,3,Xingtai
0.000000000000000,0.000000000000000,13.000000000000000,130.000000000000000,31030,保定,130601,130601,3,Baoding
0.000000000000000,0.000000000000000,14.000000000000000,133.000000000000000,31030,沧州,130901,130901,3,Cangzhou
0.000000000000000,0.000000000000000,15.000000000000000,208.000000000000000,31040,衡水,133001,133001,3,Hengshui
0.000000000000000,0.000000000000000,16.000000000000000,220.000000000000000,31020,太原,140101,140101,2,Taiyuan
0.000000000000000,0.000000000000000,17.000000000000000,224.000000000000000,31030,大同,140201,140201,3,Datong
0.000000000000000,0.000000000000000,18.000000000000000,225.000000000000000,31030,阳泉,140301,140301,3,Yangquan
0.000000000000000,0.000000000000000,19.000000000000000,237.000000000000000,31030,晋城,140501,140501,3,Jincheng
0.000000000000000,0.000000000000000,20.000000000000000,242.000000000000000,31030,朔州,140601,140601,3,Shuozhou
0.000000000000000,0.000000000000000,21.000000000000000,253.000000000000000,31040,忻州,142201,142201,3,Xinzhou
0.000000000000000,0.000000000000000,22.000000000000000,274.000000000000000,31060,离石,142331,142331,3,Lishi
0.000000000000000,0.000000000000000,23.000000000000000,277.000000000000000,31040,榆次,142401,142401,3,Yuci
0.000000000000000,0.000000000000000,24.000000000000000,284.000000000000000,31040,临汾,142601,142601,3,Linfen
0.000000000000000,0.000000000000000,25.000000000000000,300.000000000000000,31040,运城,142701,142701,3,Yuncheng
0.000000000000000,0.000000000000000,26.000000000000000,314.000000000000000,31030,长治,140401,140401,3,Changzhi
0.000000000000000,0.000000000000000,27.000000000000000,322.000000000000000,31020,呼和浩特,150101,150101,2,Huhehaote
0.000000000000000,0.000000000000000,28.000000000000000,325.000000000000000,31030,包头,150201,150201,3,Baotou
0.000000000000000,0.000000000000000,29.000000000000000,328.000000000000000,31030,乌海,150301,150301,3,Wuhai
0.000000000000000,0.000000000000000,30.000000000000000,331.000000000000000,31040,集宁,152601,152601,3,Jining

[此贴子已经被作者于2015-10-29 12:31编辑过]

搜索更多相关主题的帖子: 景德镇 文本文件 居民点 控制台 
2015-10-27 19:58
hjx1120
Rank: 15Rank: 15Rank: 15Rank: 15Rank: 15
来 自:李掌柜
等 级:贵宾
威 望:41
帖 子:1314
专家分:6927
注 册:2008-1-3
收藏
得分:7 
好好学习 天天向上
2015-10-28 06:27
rjsp
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:528
帖 子:9025
专家分:54030
注 册:2011-1-18
收藏
得分:7 
第一行11个字段,其后10个字段,呵呵
2015-10-28 08:22
沐凝
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2015-10-12
收藏
得分:0 
回复 3楼 rjsp
这个细节可以忽略~嘻嘻。能不能把思路说说~
2015-10-28 08:52
TonyDeng
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:贵宾
威 望:304
帖 子:25859
专家分:48889
注 册:2011-6-22
收藏
得分:7 
頂行的字段數好像跟下面的數據項數不符呀

授人以渔,不授人以鱼。
2015-10-28 16:46
快速回复:求解c++习题,刚学不怎么会~
数据加载中...
 
   



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

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