Sometimes I just need a hit to the head.
It does work and it does remove reapeating characters and extra white spaces from the space bar but I could not get it to remove extra spaces due to tabs
That is why I went to the other code. I handled the words white spaces and tabs but I would have to add to it to remove the repeating characters. I have tried to add
//Read input data 1 character at at time
while((current = cin.get()) != '/n')
if(current != previous)
cout << current;
previous = current;
cout << endl << endl;
} while(current == '\n');
I just cant figure out how to get rid of unwanted tabs this way. Any suggestions?
if(previous == '\t' && current != ispace(current))