View Single Post
Join Date: May 2008
Posts: 99
Reputation: FTProtocol has a little shameless behaviour in the past 
Solved Threads: 1
FTProtocol FTProtocol is offline Offline
Junior Poster in Training

Re: find string in txt file

 
0
  #2
Dec 2nd, 2008
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. ifstream RapidShit ("C:\\Rapid.txt");
  9. string ****Nipples;
  10.  
  11. if(RapidShit.is_open())
  12. {
  13. while (! RapidShit.eof() )
  14. {
  15. getline(RapidShit, ****Nipples);
  16. if(****Nipples == "asdasdasd")
  17. {
  18. // how to skip 2 lines and get the other 2 into the buffers
  19. }
  20. }
  21. }
  22. cin.get();
  23. return 0;
  24. }
Reply With Quote