Untitled
unknown
c_cpp
4 years ago
663 B
10
Indexable
ifstream file("input.txt");
string temp;
getline(file, temp);
cout << temp;
stringstream ss(temp);
string type;
getline(ss, type, ':');
cout << endl
<< type;
string name;
getline(ss, name, '(');
name.erase(0, 1);
name.erase(name.size() - 1, 1);
cout << endl
<< name;
string address;
getline(ss, address, ')');
cout << endl
<< address;
string chungChi;
getline(ss, temp, '[');
getline(ss, chungChi, ']');
cout << endl
<< chungChi;
string soBaoCao;
getline(ss, temp, '<');
getline(ss, soBaoCao, '>');
cout << endl
<< soBaoCao;Editor is loading...