Steve wrote:

>OK, my turn for a dumb C question. If I have a string variable, e.g., 
>char myString[6], and then I have an API call which requires a const char 
>*x, how do I pass the variable myString in the function call to make it 
>be passed by value rather than by reference?
You can't pass by value, strictly speaking, but if it's a const char* its 
contents can't be modified anyway, so why would you need to?

To convert to const char*, you can just cast directly:

char myString[6];

APICall( (const char*)myString );

Dave Johnson


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to