ok so heres the assignment
Spell Checker
You will write a program that reads a file and performs a spell check on the file. You should specify the name of the file from the command line.
Example
SpellCheck example.txt
Your program should read in a word list to use for the spell check. You can find a word list online using google or some other search engine. A suitable word list should list a single word per line in the file. You will read this word list into some data structure. An array can be used, but you will need to calculate the size of the array before running the program. You may also want to look into an alternate data structure like a vector or list or hash table. Once you read the dictionary into memory, you will read the file to be checked, and compare each word to the dictionary to determine if the word is in the list. If the word is not in the list, you should print the word and its location in the text. You do not need to offer suggestions for the incorrect word, just identify it as misspelled.
For instance, given the following input:
I lvoe programming class. It is teh best!
You program should output
Misspelled Words
Location Word
2 lvoe
7 teh
__________________________________________________ ______________
so basically this is how far i got that i realized i was confused can some1 help me out but like keep the code as simple as possible
i know i have to add a array and some strings and chars and/or binaryfunction something im just not sure how to do it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
#include <iostream>
#include <conio.h>
#include <fstream>
#include <cstring>
using namespace std;
int main()
{
Int item[5]
Int I
ifstream inFile;
inFile.open("C:\\temp\\datafile.txt");
Char str[30];
Cin.get(str,31);
|