I\'m having trouble with the code below with the error on line 5:
error: invalid conversion from void* to char*
void*
char*
I assume this is the line with malloc. Just cast the result then - char *foo = (char*)...
char *foo = (char*)...