【发布时间】:2016-12-16 05:25:16
【问题描述】:
我已经要求用户输入几个字符串元素来创建一个字符串向量,并希望将它们打印到一个数据文件中。
fstream file_name;
string user_input_file;
vector<vector<string>>read_in_vector;
file_name.open(user_input_file.c_str());
cout << "You have entered:" << endl;
cout << "Row Desc: " << add_row << endl;
cout << "Username: " << add_username << endl;
cout << "Password: " << add_password << endl;
cout << "Notes: " << add_notes << endl << endl;
vector<string>temp = { add_row,add_username,add_password,add_notes };
我将如何添加名为 temp 的向量元素 进入数据文件而不擦除数据文件的现有部分
【问题讨论】: