rendered paste bodyvoid translateStream(istream &input,ostream &output){ static int mpe=0; if(mpe==15) return; if( !(input.good()) ) return; char tempWords[64]; char tempTranslated[100]; char tempChar = '\0'; memset(tempWords, '\0', 64); memset(tempTranslated, '\0', 100); bool notInWord = true; bool completeWord = false; bool eofFound = false; int i = 0; while( !(completeWord) ) { input.get(tempChar); if( (isspace(tempChar) || ispunct(tempChar)) && notInWord ) { output << tempChar; } else if((isspace(tempChar)||ispunct(tempChar))&& !(notInWord)) { input.unget(); completeWord = true; } else { notInWord = false; tempWords[i]=tempChar; i++; } }