Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ifstream stream1("example.txt");
- string line ;
- ofstream stream2("target.txt");
- while( std::getline( stream1, line ) )
- {
- if(line.find("Diamond") != string::npos)
- stream2 << line << endl;
- cout << line << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement