Click here to Skip to main content
16,011,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralBACKGROUND THREAD Pin
5-Jan-01 15:37
suss5-Jan-01 15:37 
GeneralRe: BACKGROUND THREAD Pin
Jonahtan1-Feb-01 8:16
Jonahtan1-Feb-01 8:16 
GeneralSpell Checker - array list speed improvements Pin
Peter Pearson5-Jan-01 11:43
Peter Pearson5-Jan-01 11:43 
GeneralRe: Spell Checker - array list speed improvements Pin
David Cunningham5-Jan-01 12:03
cofounderDavid Cunningham5-Jan-01 12:03 
GeneralRe: Spell Checker - array list speed improvements Pin
Steve Driessens5-Jan-01 13:40
Steve Driessens5-Jan-01 13:40 
GeneralRe: Spell Checker - array list speed improvements Pin
Peter Pearson8-Jan-01 11:41
Peter Pearson8-Jan-01 11:41 
GeneralRe: Spell Checker - array list speed improvements Pin
Wilka5-Jan-01 13:46
Wilka5-Jan-01 13:46 
GeneralRe: Spell Checker - array list speed improvements Pin
Michael Dunn5-Jan-01 16:38
sitebuilderMichael Dunn5-Jan-01 16:38 
Is your array of words sorted? If not, then nothing you do will help the speed, because every time you search the list, you'll have to do a brute-force search.
If you do have the words ordered, put them in a binary tree instead of a flat array. That greatly speeds up searches, and it's easy to add new words, whereas it's _very_ expensive to add something in the middle of an ordered array.

I wrote a spell checker for myself back in college to teach myself some C++, but it just did lookups, not suggestions or letter-matching like yours. I used a simple hash table, but a hash table isn't ordered, so that wouldn't be a good solution for you.

As an aside, if you have access to a Unix system, grab its /usr/dict/words file - it's a word list. Smile | :) I'm sure there are also word lists out on the net, if you look (or search Google).

--Mike--
http://home.inreach.com/mdunn/
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
  --Buffy
GeneralRe: Spell Checker - array list speed improvements Pin
Chris Maunder5-Jan-01 16:42
cofounderChris Maunder5-Jan-01 16:42 
GeneralRe: Spell Checker - array list speed improvements Pin
Peter Pearson7-Jan-01 3:52
Peter Pearson7-Jan-01 3:52 
GeneralRe: Spell Checker - array list speed improvements Pin
David Cunningham7-Jan-01 6:48
cofounderDavid Cunningham7-Jan-01 6:48 
GeneralRe: Spell Checker - array list speed improvements Pin
Peter Pearson7-Jan-01 9:20
Peter Pearson7-Jan-01 9:20 
GeneralRe: Spell Checker - array list speed improvements Pin
Peter Pearson7-Jan-01 9:20
Peter Pearson7-Jan-01 9:20 
GeneralRe: Spell Checker - Dictionary Pin
Peter Pearson7-Jan-01 9:39
Peter Pearson7-Jan-01 9:39 
QuestionHow to safely pass CPropertySheet to DLL Pin
Joe Hastings5-Jan-01 7:21
Joe Hastings5-Jan-01 7:21 
QuestionHow to: Create fullscreen application in Visual C++ (with and without MFC) Pin
5-Jan-01 7:18
suss5-Jan-01 7:18 
AnswerRe: How to: Create fullscreen application in Visual C++ (with and without MFC) Pin
Christian Graus5-Jan-01 10:09
protectorChristian Graus5-Jan-01 10:09 
General3D Object System Color Pin
NormDroid5-Jan-01 4:48
professionalNormDroid5-Jan-01 4:48 
GeneralRe: 3D Object System Color Pin
Michael Dunn5-Jan-01 16:46
sitebuilderMichael Dunn5-Jan-01 16:46 
GeneralCListCtrl problem Pin
5-Jan-01 3:58
suss5-Jan-01 3:58 
QuestionHow to implement XOR-PUT bitmap drawing ? Pin
5-Jan-01 1:24
suss5-Jan-01 1:24 
AnswerRe: How to implement XOR-PUT bitmap drawing ? Pin
NormDroid5-Jan-01 4:45
professionalNormDroid5-Jan-01 4:45 
GeneralNetwork Provider DLL Pin
Shawnerton4-Jan-01 13:33
Shawnerton4-Jan-01 13:33 
GeneralNetwork Provider DLL Pin
Shawnerton4-Jan-01 13:33
Shawnerton4-Jan-01 13:33 
GeneralNetwork Provider DLL Pin
Shawnerton4-Jan-01 13:32
Shawnerton4-Jan-01 13:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.