|
|
|
|
I used a global variable to store the words (I look at it like a word jar) so I can reference the words contained in that storage space from any function. (The scope of the words is the whole program). |
I called it processString() because it is processing the string that getString() got. It is comparing the first word of the line with the rest in that line. |
I am not sure how to process the line using stringstream. |
|
|
I have tried telling my teacher in class about how void main() is wrong and also how system("pause") is wrong, but he says don't worry about it for the means of this class. |
I may have to find a way of comparing char by char. |
|
|
Maybe someone can think of something now that I have taken the individual chars and put them in vectors to compare one by one. |
COMPUTER COMPUDER COPMUTER COMPTER COMPUTXER KOMPUTERS COMPUTER BRITNEY BRITTANY BRITNE BRITNYE BTITINEY BRITNEYS KOURNIKOVA KOURNIKOVO OURNIKOVA OKURNIKOVA SKOURNIKOVA COURNIKOVA KOURNAKOVA NAME SALE SALES NALE NAIL NALES NAMES NAMSE NAM NMAE |
*****Starting a new line***** Correct word is COMPUTER User word is COMPUDER The user word has one character substituted User word is COPMUTER The user word contains a transposition User word is COMPTER The user word has one character deleted User word is COMPUTXER The user word has one character inserted User word is KOMPUTERS The user word is too bad to be a misspelling User word is COMPUTER The user word is correct *****Starting a new line***** Correct word is BRITNEY User word is BRITTANY The user word is too bad to be a misspelling User word is BRITNE The user word has one character deleted User word is BRITNYE The user word contains a transposition User word is BTITINEY The user word is too bad to be a misspelling User word is BRITNEYS The user word has one character inserted *****Starting a new line***** Correct word is KOURNIKOVA User word is KOURNIKOVO The user word has one character substituted User word is OURNIKOVA The user word has one character deleted User word is OKURNIKOVA The user word contains a transposition User word is SKOURNIKOVA The user word has one character inserted User word is COURNIKOVA The user word has one character substituted User word is KOURNAKOVA The user word has one character substituted *****Starting a new line***** Correct word is NAME User word is SALE The user word is too bad to be a misspelling User word is SALES The user word is too bad to be a misspelling User word is NALE The user word has one character substituted User word is NAIL The user word is too bad to be a misspelling User word is NALES The user word is too bad to be a misspelling User word is NAMES The user word has one character inserted User word is NAMSE The user word has one character inserted User word is NAM The user word has one character deleted User word is NMAE The user word contains a transposition There was 1 correct word There were 5 words with a insertion There were 4 words with a deletion There were 5 words with a substitution There were 4 words with a transposition There were 7 words that were way off |
|
|