Original Post
Hi I want to pass a const void ptr argument to a function and take a copy of it like so :
void myclass::myfunc ( const void *buffer )
{
m_buffer = buffer;
}
where m_buffer is a normal void* (not const)
I get an error telling me that a void* and const void* are incompatible. I know its a good practice to const your arguments that will not be changed so what do i need to do? I know i could cast it but that seems to defeat the purpose of all of this. Ta.