Hi,
I am trying to convert a complex c program to c++ to make it easier to maintain. I am trying to complie the c code using g++ and I get the following error:
error: invlid conversion from 'void *' to 'char *'
I am freeing up some memory in the c program. The code that causes the error is:
Code:
seq=ckfree((void *)seq);
This calls the following function:
Code:
void *ckfree(void *ptr)
{
if (ptr == NULL)
warning("Bad call to ckfree\n");
else {
free(ptr);
ptr = NULL;
}
return ptr;
}
The variable seq is a char*.
Does anyone know what could be causing the error? Is it something that is not allowed in c++, that is allowed in c? Also does anyone has links to information on things to look out for when converting c to c++?
If anyone can help it would be much appreciated.
Mark