Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <fstream>
  2. #include <iostream>
  3.  
  4. int main()
  5. {
  6. std::fstream names;
  7. names.open( "imiona.txt", std::ios::in | std::ios::out );
  8.  
  9. int x;
  10. char bufor[ 15 ];
  11. while(!names.eof())
  12. {
  13.  
  14. names.read( bufor, 15 );
  15. for(int i = 0; i < 15; i++)
  16. {
  17. if(bufor[i]==13)
  18. x++;
  19. }
  20. }
  21. names.close();
  22. std::cout << x;
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement