Years ago, I learned this trick from somebody in the C/C++ Journal, or
whatever that rag was called:
memcpy(*data_buf,bp,len)[len] = '\0';
I get the following error:
indatax.c: In function `read_datum':
indatax.c:374: warning: dereferencing `void *' pointer
indatax.c:374: invalid use of void expression
and if I cast the function:
(char *) memcpy(*data_buf,bp,len)[len] = '\0';
I get:
indatax.c: In function `read_datum':
indatax.c:374: warning: dereferencing `void *' pointer
indatax.c:374: void value not ignored as it ought to be
What aren't I understanding here? Tell me to go away if these
questions are too elementary for the list....
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming"
in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html