Please can somebody help me with the following extract of code.
If the text file contains "AB" it reports A:1 B:2
If the text file contains "BA" it reports A:2 B:1
i.e it always adds 1 onto the last character found!
No amount of following through the debugger etc helps, please can somebody fill in the gap in my understanding?
int main(int argc, char* argv)
int CountA=0, CountB=0;
File >> Input;
cout << "A:" << CountA << endl
<< "B:" << CountB << endl;