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

C / C++ / MFC

 
GeneralRe: Pointer to CMainFrame Pin
Alexandru Savescu16-May-02 2:10
Alexandru Savescu16-May-02 2:10 
GeneralRe: Pointer to CMainFrame Pin
Tomasz Sowinski16-May-02 2:32
Tomasz Sowinski16-May-02 2:32 
Questionstat usbar and dialog bar ? Pin
Stan the man16-May-02 0:56
Stan the man16-May-02 0:56 
GeneralMCI question ... Pin
Hadi Rezaee16-May-02 0:48
Hadi Rezaee16-May-02 0:48 
QuestionHow to modify a DLL Pin
Kiddxin15-May-02 23:28
Kiddxin15-May-02 23:28 
AnswerRe: How to modify a DLL Pin
Christian Graus15-May-02 23:33
protectorChristian Graus15-May-02 23:33 
AnswerRe: How to modify a DLL Pin
Nish Nishant16-May-02 0:42
sitebuilderNish Nishant16-May-02 0:42 
GeneralTraversing array Pin
alex.barylski15-May-02 22:55
alex.barylski15-May-02 22:55 
Sorry if my terminology is wrong. Smile | :)

Anyways...How would I iterate an array of the following structure:

struct ITEM{
  LPSTR Parent
  LPSTR Caption
  UINT Command
  ITEM Child 
}


I'm NOT looking for a C++ solution, but a generic psuedo-language answer would be GREAT!!!

I'm losing my mind trying to figure out how this would be done...if the array were simple it would be easy even if the number of levels were known it would be easier...a couple nested for loops would suffice. However...when each last field is a pointer to another just like it (but slightly different) that simple array transforms into something...I can't comprehend and it's driving me insane...

Anyone ever deal with such a data structure before...?

I thought this was a linked list or sort of anyways, but I can't just follow one elemnt to the next...I have to iterate each item in the array...

ie:

if there were 5 items, each had ZER0 children except the last which had 5 levels of 5 children each how would I loop through this kinda array and return all data...?

I'm playing with the idea of a windows menu data structure and my god...i'm lost...

Any ideas...?

Thanx! Smile | :)

"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
GeneralRe: Traversing array Pin
Jon Hulatt15-May-02 23:03
Jon Hulatt15-May-02 23:03 
GeneralRe: Traversing array Pin
Christian Graus15-May-02 23:20
protectorChristian Graus15-May-02 23:20 
GeneralRe: Traversing array Pin
Jon Hulatt15-May-02 23:21
Jon Hulatt15-May-02 23:21 
GeneralRe: Traversing array Pin
alex.barylski16-May-02 1:08
alex.barylski16-May-02 1:08 
GeneralRe: Traversing array Pin
Jon Hulatt16-May-02 2:52
Jon Hulatt16-May-02 2:52 
GeneralRe: Traversing array Pin
Christian Graus15-May-02 23:05
protectorChristian Graus15-May-02 23:05 
GeneralRe: Traversing array Pin
alex.barylski16-May-02 1:04
alex.barylski16-May-02 1:04 
GeneralRe: Traversing array Pin
Christian Graus16-May-02 1:05
protectorChristian Graus16-May-02 1:05 
GeneralRe: Traversing array Pin
alex.barylski16-May-02 13:14
alex.barylski16-May-02 13:14 
GeneralRe: Traversing array Pin
Christian Graus16-May-02 13:29
protectorChristian Graus16-May-02 13:29 
GeneralRe: Traversing array Pin
alex.barylski16-May-02 13:52
alex.barylski16-May-02 13:52 
QuestionHow to smooth drawing on the screen? Pin
davilism15-May-02 22:00
davilism15-May-02 22:00 
AnswerRe: How to smooth drawing on the screen? Pin
Alexandru Savescu15-May-02 22:15
Alexandru Savescu15-May-02 22:15 
AnswerRe: How to smooth drawing on the screen? Pin
Tomasz Sowinski16-May-02 2:30
Tomasz Sowinski16-May-02 2:30 
QuestionIDataObject GetData OOOOLD Win 3.1 Metafiles ?????????????? Pin
Braulio Dez15-May-02 22:05
Braulio Dez15-May-02 22:05 
QuestionWhy my program runs well in normal LAN while die in Wireless LAN? Pin
Cloudway15-May-02 21:54
Cloudway15-May-02 21:54 
AnswerRe: Why my program runs well in normal LAN while die in Wireless LAN? Pin
Joaquín M López Muñoz15-May-02 22:07
Joaquín M López Muñoz15-May-02 22:07 

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.