View Single Post
Old 03-21-2005, 07:41 AM   #1 (permalink)
frier
Registered User
 
Join Date: Mar 2005
Posts: 4
frier is on a distinguished road
Array to pointer to pointer

Hi Guys,

Sitting with a problem.

I have a function, which demands a pointer to some data.

Code:
gputsym(x,0,(PGSYMBOL) &icon15);
icon15 is the pointer to the dataarea

When I write the pointername, I use in the dataarea, it works allright.

But the pointername should be substituted with a name entered in an array, but now it is going wrong.

I tried to declare my array like this

Code:
char mgtext[10][30], mgicon[10][6];
Actually the array mgicon should be an array[10] of strings but....
so instead, I manually read in from the file, each character at a time, and then add it to the mgicon[2][0] ... mgicon[2][6] (i,c,o,n,1,5,\0)

Now, mgicon[2] for example should contain 'icon15'

so the above code should be

Code:
gputsym(x,0,(PGSYMBOL) mgicon[2]);
This doesn't work, looked everywhere, can not find a solutions to this problem, hope somebody can give me a hint.

Best regards
Frier

Last edited by frier; 03-21-2005 at 07:45 AM. Reason: entering code-bracket
frier is offline   Reply With Quote