Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <fstream>
- using namespace std;
- int main()
- {
- ifstream fin;
- string file, name, bin;
- int k, x;
- cin >> file;
- cin >> k;
- fin.open(file);
- do {
- fin >> name;
- fin >> x;
- getline(fin, bin);
- if (x == k) {
- cout << name << '\n';
- }
- } while (!fin.eof());
- fin.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement