求解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编辑过]