From: faculaganymede (faculaganymede++at++yahoo.com)
Date: 02/17/2004 13:34:58
I have a C/C++ programming question. It is not
exactly related to Performer, but I know you are all
experts in the area, so hopefully someone can help me
out.
I have to use an API function with the following
prototype:
void fun(const char *fnames[][2]);
//fnames is supposed to be a 3D array (can be thought
of as two arrays of pointers with each pointer
pointing to a string of characters).
//For example, fnames can be used to store the names
of students in two workshops. The number of students
in the two //workshops may or may not be the same.
The names of the students can be of length 256
characters.
How can I setup the argument variable (fnames) to use
fun()?
Here is what I've tried but didn't work:
----------------------------------------
I allocated a variable of the following type and gave
it some values:
char **temp[2];
Then, I called the function as follows, but I couldn't
seem to get it to work:
fun(temp); //doesn't work, typecast error
fun((const char **[2])temp); //doesn't work, typecast
error
fun((const char ***)temp); //doesn't work, typecast error
=====
Thanks,
faculaganymede
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
This archive was generated by hypermail 2b29 : Tue Feb 17 2004 - 13:37:48 PST