Click here to Skip to main content
15,917,321 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MAPI Pin
ranjjj1-Sep-03 3:13
ranjjj1-Sep-03 3:13 
GeneralRe: MAPI Pin
Vitali Halershtein1-Sep-03 3:29
Vitali Halershtein1-Sep-03 3:29 
GeneralRe: MAPI Pin
ranjjj1-Sep-03 3:33
ranjjj1-Sep-03 3:33 
GeneralRe: MAPI Pin
ranjjj1-Sep-03 3:36
ranjjj1-Sep-03 3:36 
GeneralRe: MAPI Pin
Vitali Halershtein1-Sep-03 4:01
Vitali Halershtein1-Sep-03 4:01 
GeneralRe: MAPI Pin
ranjjj1-Sep-03 19:27
ranjjj1-Sep-03 19:27 
GeneralRecursive to iterative. Pin
1-Sep-03 1:53
suss1-Sep-03 1:53 
GeneralRe: Recursive to iterative. Pin
Joaquín M López Muñoz1-Sep-03 2:50
Joaquín M López Muñoz1-Sep-03 2:50 
This is homework, so it is not fair to provide a full solution. Instead, I can give you some guidance. In a recursive function, each time the function is further invoked a new set of argument and local variables is created. In your particular case, find only uses two argument variables, namely temproot and key. So, you can think of the function in progress as progressively creating variables temproot1, key1, temproot2, key2 and so on. Now, if you want to avoid recursion, you'll have to find a way to reuse the local variables so that they adopt the rol they'd have in a recursive call. find is particularly simple, as key is really a constant value (it never changes inside the function), and as for temproot you can notice that it is no longer used after recursively invoking find, so you can safely change it to hold the value it'd have in the recursive invokation and loop again (instead of calling find.)

Good luck, don't hesitate to post again if you stuck somewhere.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralThe number of new and unread emails Pin
Member 3781121-Sep-03 1:38
Member 3781121-Sep-03 1:38 
GeneralRe: The number of new and unread emails Pin
Vitali Halershtein1-Sep-03 1:47
Vitali Halershtein1-Sep-03 1:47 
GeneralRe: The number of new and unread emails Pin
greatbear992-Sep-03 2:29
sussgreatbear992-Sep-03 2:29 
QuestionHow to find which Window have some DC ? Pin
vgrigor1-Sep-03 1:34
vgrigor1-Sep-03 1:34 
AnswerRe: How to find which Window have some DC ? Pin
Vitali Halershtein1-Sep-03 1:59
Vitali Halershtein1-Sep-03 1:59 
GeneralRe: How to find which Window have some DC ? Pin
vgrigor1-Sep-03 2:00
vgrigor1-Sep-03 2:00 
GeneralRe: How to find which Window have some DC ? Pin
Vitali Halershtein1-Sep-03 2:12
Vitali Halershtein1-Sep-03 2:12 
Generalclient server program Pin
vision20041-Sep-03 0:42
vision20041-Sep-03 0:42 
GeneralRe: client server program Pin
valikac1-Sep-03 5:52
valikac1-Sep-03 5:52 
GeneralDrawing on Dialog using DC Pin
YaronNir1-Sep-03 0:04
YaronNir1-Sep-03 0:04 
GeneralRe: Drawing on Dialog using DC Pin
Vitali Halershtein1-Sep-03 0:19
Vitali Halershtein1-Sep-03 0:19 
GeneralRe: Drawing on Dialog using DC Pin
YaronNir1-Sep-03 1:00
YaronNir1-Sep-03 1:00 
GeneralRe: Drawing on Dialog using DC Pin
Vitali Halershtein1-Sep-03 2:23
Vitali Halershtein1-Sep-03 2:23 
GeneralRe: Drawing on Dialog using DC Pin
csc1-Sep-03 2:10
csc1-Sep-03 2:10 
GeneralRe: Drawing on Dialog using DC Pin
YaronNir1-Sep-03 2:12
YaronNir1-Sep-03 2:12 
GeneralString Parsing Pin
KKR31-Aug-03 23:50
KKR31-Aug-03 23:50 
GeneralRe: String Parsing Pin
Vitali Halershtein1-Sep-03 0:08
Vitali Halershtein1-Sep-03 0:08 

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.