Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by sorcor ( 13 years ago )
#include <cstdlib>
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char *argv[])
{
char text;
ifstream plik1;
ofstream plik2;
int suma=0;
plik1.open("plik.txt");
while(!plik1.eof())
{
plik1>>text;
cout<<text;
if(text=='a')
suma++;
}
plik2.open("a.txt");
plik2<<"Liter a jest w pliku "<<suma;
cout<<endl<<suma<<endl;
plik1.close();
system("PAUSE");
return EXIT_SUCCESS;
}
Revise this Paste