C++ 从TXT文件中读取数据存到数组

日期:2020-05-01 12:39:28 人气:2

C++ 从TXT文件中读取数据存到数组

首席需要用到fstream头文件,然后用ifstream就可以了。 我给lz写一个例子,lz看一下就明白了: strcut stocktype { string personaddress; string personcity; string personstate; int personzip; }; void addresstype :: getdata() { ifstream infile; int index; string inputfile;
    A+
热门评论