Click here to Skip to main content
16,006,378 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C++ Program with date and class Pin
led mike18-Jun-07 7:10
led mike18-Jun-07 7:10 
GeneralRe: C++ Program with date and class Pin
berni2k18-Jun-07 8:36
berni2k18-Jun-07 8:36 
Questionstack overflow Pin
Lord_Vader18-Jun-07 6:26
Lord_Vader18-Jun-07 6:26 
AnswerRe: stack overflow Pin
led mike18-Jun-07 6:39
led mike18-Jun-07 6:39 
GeneralRe: stack overflow Pin
Lord_Vader18-Jun-07 6:44
Lord_Vader18-Jun-07 6:44 
GeneralRe: stack overflow Pin
Cyrilix18-Jun-07 6:46
Cyrilix18-Jun-07 6:46 
GeneralRe: stack overflow Pin
Lord_Vader18-Jun-07 6:52
Lord_Vader18-Jun-07 6:52 
GeneralRe: stack overflow Pin
James R. Twine18-Jun-07 7:14
James R. Twine18-Jun-07 7:14 
   Stack memory is generally required for the function call information (return values and return address), as well as for the automatic variables in the function being called.  One function may consume only 32 bytes of stack while another consumes more than 8KB of stack.

   It is possible to recursively iterate over any size list...   Given you have enough stack space and your environment supports it.  Realistically, this depends on (1) how much stack is consumed by the recursive function, (2) how many elements are in the list, and (3) how much free stack space you have remaining at the time you start recursion (just because you have 1MB of stack by default in Win32, that does not mean that by the time your function is first called that you will have much of it left).

   Iteration is generally better done using loops instead of recursion.  It is also easier to debug, because you can more easily break at a certain loop counter than a certain recursion depth.

   Peace!

-=- James
Please rate this message - let me know if I helped or not!<HR>If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles

GeneralRe: stack overflow Pin
Lord_Vader18-Jun-07 7:58
Lord_Vader18-Jun-07 7:58 
GeneralRe: stack overflow Pin
James R. Twine18-Jun-07 11:37
James R. Twine18-Jun-07 11:37 
GeneralRe: stack overflow Pin
Lord_Vader19-Jun-07 5:38
Lord_Vader19-Jun-07 5:38 
GeneralRe: stack overflow Pin
#realJSOP19-Jun-07 3:41
professional#realJSOP19-Jun-07 3:41 
AnswerRe: stack overflow Pin
Nemanja Trifunovic18-Jun-07 6:52
Nemanja Trifunovic18-Jun-07 6:52 
GeneralRe: stack overflow Pin
Cyrilix18-Jun-07 7:16
Cyrilix18-Jun-07 7:16 
QuestionNeed to check if a process is active or not. Pin
Arish rivlin18-Jun-07 6:12
Arish rivlin18-Jun-07 6:12 
AnswerRe: Need to check if a process is active or not. Pin
Mark Salsbery18-Jun-07 6:27
Mark Salsbery18-Jun-07 6:27 
GeneralRe: Need to check if a process is active or not. Pin
Arish rivlin18-Jun-07 6:43
Arish rivlin18-Jun-07 6:43 
QuestionDistinct values in 2D char array... Pin
Adeel Chaudhry18-Jun-07 6:10
Adeel Chaudhry18-Jun-07 6:10 
AnswerRe: Distinct values in 2D char array... Pin
Cyrilix18-Jun-07 7:03
Cyrilix18-Jun-07 7:03 
AnswerRe: Distinct values in 2D char array... Pin
Mark Salsbery18-Jun-07 7:34
Mark Salsbery18-Jun-07 7:34 
QuestionCombo box control does not display data list? Pin
dkyue9270818-Jun-07 5:24
dkyue9270818-Jun-07 5:24 
AnswerRe: Combo box control does not display data list? Pin
led mike18-Jun-07 5:38
led mike18-Jun-07 5:38 
GeneralRe: Combo box control does not display data list? Pin
dkyue9270818-Jun-07 5:46
dkyue9270818-Jun-07 5:46 
GeneralRe: Combo box control does not display data list? Pin
led mike18-Jun-07 7:07
led mike18-Jun-07 7:07 
GeneralRe: Combo box control does not display data list? Pin
dkyue9270818-Jun-07 7:25
dkyue9270818-Jun-07 7:25 

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.