Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <iostream>
- int main()
- {
- std::fstream names;
- names.open( "imiona.txt", std::ios::in | std::ios::out );
- int x;
- char bufor[ 15 ];
- while(!names.eof())
- {
- names.read( bufor, 15 );
- for(int i = 0; i < 15; i++)
- {
- if(bufor[i]==13)
- x++;
- }
- }
- names.close();
- std::cout << x;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement