Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int checkLineForMisspelling( char *line )
- {
- char **wordsInLine = malloc( 100 * sizeof(char *) );
- char *token = strtok (line, " ");
- int index = 0;
- while (token != NULL) {
- wordsInLine[index] = token;
- index++;
- token = strtok (NULL, " ");
- }
- for ( int i = 0; i < index; i++ ) {
- }
- for (int i = 0; i < index; i++) {
- if ( isInDictionary( wordsInLine[i] ) ) {
- printf( "%s", wordsInLine[i] );
- } else {
- printf( "%s", markMisspelled( wordsInLine[i] ) );
- }
- // printf( "%s\n", wordsInLine[i] );
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement