Click here to Skip to main content
15,891,529 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: STL headache Pin
Christian Graus9-Aug-06 17:38
protectorChristian Graus9-Aug-06 17:38 
AnswerRe: STL headache Pin
Zac Howland10-Aug-06 4:38
Zac Howland10-Aug-06 4:38 
QuestionQuicksort algorithm is Causing stack overflow [modified] Pin
JKallen9-Aug-06 16:43
JKallen9-Aug-06 16:43 
AnswerRe: Quicksort algorithm is Causing stack overflow Pin
PJ Arends9-Aug-06 16:53
professionalPJ Arends9-Aug-06 16:53 
GeneralRe: Quicksort algorithm is Causing stack overflow Pin
JKallen9-Aug-06 16:58
JKallen9-Aug-06 16:58 
AnswerRe: Quicksort algorithm is Causing stack overflow Pin
Christian Graus9-Aug-06 16:54
protectorChristian Graus9-Aug-06 16:54 
GeneralRe: Quicksort algorithm is Causing stack overflow Pin
JKallen9-Aug-06 17:00
JKallen9-Aug-06 17:00 
GeneralRe: Quicksort algorithm is Causing stack overflow Pin
Christian Graus9-Aug-06 17:02
protectorChristian Graus9-Aug-06 17:02 
JKallen wrote:
It is only redundant on a per compiler basis.


Yes, it's true that the standard only sets minimum sizes for variable types, a long may be bigger than an int. But I don't see how 'long' wouldn't work everywhere ?

JKallen wrote:
in fact I changed the "ints" to short signed unsigned lnog etc,...no difference


I know that, I was making a general comment about the efficiency and cleanness of the code.

JKallen wrote:
The problem is that I am running out of stack,...what i dont get is why this happenes sorting 3000 items.


Obviously because each call is placing two more calls on the stack, and you're running out.

What if you add a counter to the code, a static variable or something ? Perhaps the loop is running for more often than it needs to, and there's a bug in the partition code ?


Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog

GeneralRe: Quicksort algorithm is Causing stack overflow Pin
JKallen9-Aug-06 17:04
JKallen9-Aug-06 17:04 
GeneralRe: Quicksort algorithm is Causing stack overflow Pin
Christian Graus9-Aug-06 17:40
protectorChristian Graus9-Aug-06 17:40 
AnswerRe: Quicksort algorithm is Causing stack overflow Pin
Gerald Schwab9-Aug-06 18:07
Gerald Schwab9-Aug-06 18:07 
AnswerRe: Quicksort algorithm is Causing stack overflow Pin
David Crow10-Aug-06 4:05
David Crow10-Aug-06 4:05 
AnswerRe: Quicksort algorithm is Causing stack overflow Pin
Hamid_RT10-Aug-06 8:15
Hamid_RT10-Aug-06 8:15 
QuestionEnum local security groups in NTFS folder ACL Pin
fourierman9-Aug-06 16:32
fourierman9-Aug-06 16:32 
AnswerRe: Enum local security groups in NTFS folder ACL Pin
Milton Karimbekallil9-Aug-06 23:45
Milton Karimbekallil9-Aug-06 23:45 
QuestionComparing images.... Visual C++ (MFC) Pin
cheng859-Aug-06 16:06
cheng859-Aug-06 16:06 
AnswerRe: Comparing images.... Visual C++ (MFC) Pin
Christian Graus9-Aug-06 16:55
protectorChristian Graus9-Aug-06 16:55 
AnswerRe: Comparing images.... Visual C++ (MFC) Pin
PJ Arends9-Aug-06 16:59
professionalPJ Arends9-Aug-06 16:59 
GeneralRe: Comparing images.... Visual C++ (MFC) Pin
kaushal kishore sharma5-Oct-08 22:24
kaushal kishore sharma5-Oct-08 22:24 
AnswerRe: Comparing images.... Visual C++ (MFC) Pin
Hamid_RT9-Aug-06 22:25
Hamid_RT9-Aug-06 22:25 
QuestionHELP!! Using "AtlEscapeUrl" Pin
atsuki9-Aug-06 15:55
atsuki9-Aug-06 15:55 
QuestionMaking a script language? Pin
Lord Kixdemp9-Aug-06 15:51
Lord Kixdemp9-Aug-06 15:51 
AnswerRe: Making a script language? Pin
Christian Graus9-Aug-06 17:00
protectorChristian Graus9-Aug-06 17:00 
GeneralRe: Making a script language? Pin
Lord Kixdemp9-Aug-06 17:29
Lord Kixdemp9-Aug-06 17:29 
AnswerRe: Making a script language? Pin
Rudolf Jan10-Aug-06 0:19
Rudolf Jan10-Aug-06 0:19 

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.