Original Post
Hi folks!
I''ve been messing around with lists. Fist of all, I work with BCB5. I use the class TList and use the method ''Add(void *)'' to - surprise! surprise! - add object to the list.
Now, the first element in the list is always an ''int *''. The next element is always a pointer to an object of a self-written class.
This is how I add the elements to the list:
int iKind = 1;
int *i = &iKind
lstControl1->Add(i);
lstControl1->Add(lpGUI_Dolly);
When I want to read the elements in the list, the first element is always wrong:
ip = (int *) lstTemp->Items;
i++;
int bType = *ip;
although int * ranges from 0-9, the value always exceeds them. Though bType should have the value 1, is has something around 12,000!!
If anybody can tell me what I have made wrong, please tell me!
Thanks