How can I search for a single character in a text file and count how many user specified character are in the text file?
For example:
User input: 'a'
Number of a's in text file: 32
1 2 3 4 5 6 7 8
cout<<"Please enter the file name >> ";
cin>>fileName;
infile.open(fileName);
outfile.open("word2.txt");
cout<<"Please enter a single specific character to search for: "<<endl;
cin>>x;