J
James Purser
I have a piece of c code I am trying to include in a c++/wxWidgets
project.
len = strlen(sha1_dir);
path = malloc(len + 40);
memcpy(path, sha1_dir, len);
When I try to compile the above using g++ I get "error: invalid conversion
from void* to char*"
I have tried casting the malloc as a char * but that results in a seg
fault at the memcpy line.
Any ideas would be much appreciated.
James Purser
project.
len = strlen(sha1_dir);
path = malloc(len + 40);
memcpy(path, sha1_dir, len);
When I try to compile the above using g++ I get "error: invalid conversion
from void* to char*"
I have tried casting the malloc as a char * but that results in a seg
fault at the memcpy line.
Any ideas would be much appreciated.
James Purser