Advertisement
helenrut

Untitled

Sep 11th, 2015
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. int count_lines (ifstream& thefilename)
  2. {
  3. char (y);
  4. int counter = 0 ;
  5.  
  6. while (!thefilename.eof()) {
  7. thefilename.get(y);
  8. if (y == '\n');
  9. }
  10. counter = counter ++ ;
  11.  
  12. if (y! = '\n'){
  13. counter = counter ++ ;
  14. }
  15.  
  16. return 0;
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement