If I have a pointer to a message buffer how do I memcpy() into that buffer? For example say I have the following:
char **buffer;
char data[10]
memcpy(*buffer, data, 10);
But this doesn't seem to work and always crashes my program, however the compiler doesn't see to mind. Can someone please tell me why? Btw the reason I have a char **buffer is because its being passed as a parameter of the function.
bufferpoints nowhere specified and*bufferpoints nowhere specified. Writing to the unknown is undefined behaviour.