× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Thu, 12 Jun 2008, Lim Hock-Chai wrote:

If I've a function like below:
void logECD_STP3(const char **dataRcv);

What you have above is a function that accepts a pointer to a pointer to a char.

Below compile and work fine:
char * data;
// code that put stuff into data
. . .
logECD_STP(&data);

This works because the declaration

char * data;

defines a pointer to a char. the & symbol means "the address of", so "&data" means "the address of the variable data". Pointers are merely addresses, so since data is a pointer, &data is a pointer to a pointer (i.e. & is the address of where a pointer is stored, or & points to data which points to something else).

How do I do the same thing if I've
UAM * data;

Above you have declared a pointer that points to a variable of type UAM.

// code that put stuff into data
. . .
logECD_STP(&data); <== I got a compile error Function argument
assignment between types "unsigned char* const*" and "struct
uasmgfile**"

You get this error because logECD_STP() accepts pointers to pointers of type char, not pointers to pointers of type UAM.

James Rich

It's not the software that's free; it's you.
- billyskank on Groklaw

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.