I need to to a modification in an existing function, having some const
input parameters:
int f(const owntype *r1, const owntype *r2)
In order to do this, I would like to call a subfunction, who is using the same type, but without the const
keyword:
void subfunction (owntype *src, owntype *dst)
I've already tried this (along with quite some other variants), but it does not work:
int f(const owntype *r1, const owntype *r2) {
...
subfunction((const owntyp*) r1);
...
}
How can I get this to compile without needing to change the parmeter description of both functions?