K
Kevin L
I have a function declared as such:
void func(const int** p)
{
}
If I have calling body
void callfunc()
{
int** p;
func(p);
}
VS.NET (2002) fails to compile:
error C2664: 'const_test' : cannot convert parameter 1 from 'int ** '
to 'const int ** '
Is this expected behavior? I can resolve this error by using
const_cast to force the type change. So I'm asking out of curiosity
since I see nothing wrong with the code as is intuitively.
void func(const int** p)
{
}
If I have calling body
void callfunc()
{
int** p;
func(p);
}
VS.NET (2002) fails to compile:
error C2664: 'const_test' : cannot convert parameter 1 from 'int ** '
to 'const int ** '
Is this expected behavior? I can resolve this error by using
const_cast to force the type change. So I'm asking out of curiosity
since I see nothing wrong with the code as is intuitively.