Click here to Skip to main content
15,912,457 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Converting try/catch to __try/something Pin
integerous27-Oct-05 12:57
integerous27-Oct-05 12:57 
QuestionSecure IPC Pin
Chintoo72327-Oct-05 5:59
Chintoo72327-Oct-05 5:59 
AnswerRe: Secure IPC Pin
ThatsAlok27-Oct-05 22:25
ThatsAlok27-Oct-05 22:25 
QuestionWhat's this? Pin
Le Sourcier27-Oct-05 5:41
Le Sourcier27-Oct-05 5:41 
Question Hash string function that keeps compare properties Pin
Kochise27-Oct-05 5:27
Kochise27-Oct-05 5:27 
AnswerRe: Hash string function that keeps compare properties Pin
Chris Losinger27-Oct-05 7:30
professionalChris Losinger27-Oct-05 7:30 
GeneralRe: Hash string function that keeps compare properties Pin
Kochise27-Oct-05 21:17
Kochise27-Oct-05 21:17 
GeneralRe: Hash string function that keeps compare properties Pin
Chris Losinger28-Oct-05 1:17
professionalChris Losinger28-Oct-05 1:17 
Kochise wrote:
But their corresponding string is non-sense, they don't follow the ascending or descending order I'm trying to get.


then just take the first four characters and stuff them into a long:

long hash = (str[0] << 24) | (str[1] << 16) | (str[2] << 8) | (str[3]);

that will allow you to very quickly compare the first four characters of the strings.

you'll get a collission any time the first four characters of the two strings match.


Cleek | Image Toolkits | Thumbnail maker

GeneralRe: Hash string function that keeps compare properties Pin
Kochise28-Oct-05 3:06
Kochise28-Oct-05 3:06 
QuestionHow to pass a parm to iexplorer? Pin
mcgahanfl27-Oct-05 5:24
mcgahanfl27-Oct-05 5:24 
AnswerRe: How to pass a parm to iexplorer? Pin
BlackT27-Oct-05 5:29
BlackT27-Oct-05 5:29 
QuestionText Rotation - VC 6.0 Pin
BlackT27-Oct-05 4:17
BlackT27-Oct-05 4:17 
AnswerRe: Text Rotation - VC 6.0 Pin
Mircea Puiu27-Oct-05 7:23
Mircea Puiu27-Oct-05 7:23 
Questionquestion with the MFC documentation Pin
ewighell27-Oct-05 3:39
ewighell27-Oct-05 3:39 
AnswerRe: question with the MFC documentation Pin
Maximilien27-Oct-05 3:52
Maximilien27-Oct-05 3:52 
AnswerRe: question with the MFC documentation Pin
Chris Losinger27-Oct-05 3:55
professionalChris Losinger27-Oct-05 3:55 
AnswerRe: question with the MFC documentation Pin
toxcct27-Oct-05 3:58
toxcct27-Oct-05 3:58 
QuestionRe: question with the MFC documentation Pin
David Crow27-Oct-05 4:49
David Crow27-Oct-05 4:49 
AnswerRe: question with the MFC documentation Pin
ewighell27-Oct-05 5:02
ewighell27-Oct-05 5:02 
AnswerRe: question with the MFC documentation Pin
ewighell27-Oct-05 5:05
ewighell27-Oct-05 5:05 
QuestionHow to kill a thread ??? Pin
vikas amin27-Oct-05 2:21
vikas amin27-Oct-05 2:21 
AnswerRe: How to kill a thread ??? Pin
David Crow27-Oct-05 2:32
David Crow27-Oct-05 2:32 
AnswerRe: How to kill a thread ??? Pin
ThatsAlok27-Oct-05 22:40
ThatsAlok27-Oct-05 22:40 
QuestionWritePrinter API seems Good but Behave Difficult Pin
AsimUmair27-Oct-05 1:27
AsimUmair27-Oct-05 1:27 
QuestionRe: WritePrinter API seems Good but Behave Difficult Pin
David Crow27-Oct-05 2:38
David Crow27-Oct-05 2:38 

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.