How to filter products by type

1
2
3
4
5
6
7
8
9
void FTR(){
	string type;
	cout << "Please input the type of book:";
	cin >> type;
	ifstream file("test.txt");
    if(!file.is_open())
        cout << "Unable to open file\n";

}

I don't know how to write the code after cin is done!
The required .txt file(test.txt):
http://m.uploadedit.com/b037/1405837527237.txt

When I type Furniture,the solution is shown below:
http://postimg.org/image/aszducnn7/
Last edited on
Topic archived. No new replies allowed.