Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. ifstream stream1("example.txt");
  2. string line ;
  3. ofstream stream2("target.txt");
  4. while( std::getline( stream1, line ) )
  5. {
  6. if(line.find("Diamond") != string::npos)
  7. stream2 << line << endl;
  8. cout << line << endl;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement