I'm writing a code with following function and new to C++
foo(void const *pCluster, const uint32_t fieldNum, __attribute__((unused)) const uint32_t subFieldNum, const int64_t value)
{
bool status = false;
mycustomStruct* const pFlmcCtrl = static_cast<mycustomStruct* const>(pMdbCluster);
// Some Processing
}
This gives error error: static_cast from 'const void *' to 'mycustomStruct* const' casts away qualifiers
.
Please help me understand the error here. I could not understand