Posted By: Caermundh
How do I malloc an array of panels? - 10/22/09 22:51
So if i say:
PANEL* my_panels[50];
this will give me a 50 element array that I can store panel pointers in. Therefore, I inferred from that that I could dynamically allocate a panel array by:
PANEL* my_panel;
my_panel = (PANEL*)malloc(sizeof(PANEL*)*50);
Alas, this does not appear to work. When I try to run the script I get an error message about not beg able to convert pointer to long.
What am I doing wrong above?
PANEL* my_panels[50];
this will give me a 50 element array that I can store panel pointers in. Therefore, I inferred from that that I could dynamically allocate a panel array by:
PANEL* my_panel;
my_panel = (PANEL*)malloc(sizeof(PANEL*)*50);
Alas, this does not appear to work. When I try to run the script I get an error message about not beg able to convert pointer to long.
What am I doing wrong above?