Click here to Skip to main content
15,902,635 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How toget notification when any program or executable terminates Pin
Anonymous20-Mar-03 20:56
Anonymous20-Mar-03 20:56 
GeneralEfficient string searching (advice required) Pin
paulhans20-Mar-03 18:21
paulhans20-Mar-03 18:21 
GeneralRe: Efficient string searching (advice required) Pin
Joaquín M López Muñoz20-Mar-03 20:08
Joaquín M López Muñoz20-Mar-03 20:08 
GeneralRe: Efficient string searching (advice required) Pin
Gunnar Bolle20-Mar-03 21:45
Gunnar Bolle20-Mar-03 21:45 
GeneralRe: Efficient string searching (advice required) Pin
Joaquín M López Muñoz20-Mar-03 21:54
Joaquín M López Muñoz20-Mar-03 21:54 
GeneralRe: Efficient string searching (advice required) Pin
Gunnar Bolle20-Mar-03 21:59
Gunnar Bolle20-Mar-03 21:59 
GeneralRe: Efficient string searching (advice required) Pin
jhwurmbach20-Mar-03 23:06
jhwurmbach20-Mar-03 23:06 
GeneralRe: Efficient string searching (advice required) Pin
John R. Shaw21-Mar-03 11:23
John R. Shaw21-Mar-03 11:23 
You could load you list of words into a hash table of some sort.

Of cource you could use this very simple method:
(ASCII only solution)

class CIndexWhatEver
{
int m_Start, m_End;
....
};

Now create 2 arrays one to hold your list of strings and one to hold a list of CIndexWhatEver items. While you are loading your list into a CStringArray simply keep track of the ranges and add them to CIndexWhatEverArry. This works with ASCII to reduce search to range of strings starting with the given character.

int FindWhatEver(LPCTSTR lpStr)
{
TCHAR chStart = tolower(*lpStr);
// if in ranage 'a'-'z'
...
int nStart, nEnd;
m_WhatEverArray.GetRange(chStart-_T('a'),&nStart,&nEnd);
for( int i=nStart; i
GeneralRe: Efficient string searching (advice required) Pin
John R. Shaw21-Mar-03 11:31
John R. Shaw21-Mar-03 11:31 
QuestionHow to Translae a Mapped Drive to a UNC Path Pin
Xilin20-Mar-03 17:20
Xilin20-Mar-03 17:20 
AnswerRe: How to Translae a Mapped Drive to a UNC Path Pin
saierdia20-Mar-03 18:28
saierdia20-Mar-03 18:28 
GeneralGet line height from CRichEditCtrl Pin
lauch220-Mar-03 17:01
lauch220-Mar-03 17:01 
Generalcreate Predefined Macros Pin
mmwhw20-Mar-03 16:32
mmwhw20-Mar-03 16:32 
GeneralRe: create Predefined Macros Pin
Mike Nordell21-Mar-03 4:13
Mike Nordell21-Mar-03 4:13 
GeneralRe: create Predefined Macros Pin
Jambolo23-Mar-03 9:57
Jambolo23-Mar-03 9:57 
Generalget number from string Pin
wow999920-Mar-03 16:27
wow999920-Mar-03 16:27 
GeneralRe: get number from string Pin
mmwhw20-Mar-03 16:40
mmwhw20-Mar-03 16:40 
GeneralRe: get number from string Pin
Nish Nishant20-Mar-03 17:22
sitebuilderNish Nishant20-Mar-03 17:22 
Generalpointer's high bit Pin
Phil Hamer20-Mar-03 14:50
Phil Hamer20-Mar-03 14:50 
GeneralRe: pointer's high bit Pin
Tim Smith20-Mar-03 15:31
Tim Smith20-Mar-03 15:31 
GeneralRe: pointer's high bit Pin
John M. Drescher20-Mar-03 16:12
John M. Drescher20-Mar-03 16:12 
Generalbitmapp action Pin
el davo20-Mar-03 13:19
el davo20-Mar-03 13:19 
GeneralRe: bitmapp action Pin
Brian Shifrin20-Mar-03 15:32
Brian Shifrin20-Mar-03 15:32 
GeneralRe: bitmapp action Pin
el davo20-Mar-03 15:42
el davo20-Mar-03 15:42 
GeneralRe: bitmapp action Pin
el davo20-Mar-03 17:46
el davo20-Mar-03 17:46 

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.