I want to compare a value, pass with void*,who can be char/short/long type with a constant long type. But this code didn't work. I don't understand.
void compar (void* p_value) {
if (*p_value > CONST_MAX) {
*p_value = CONST_MAX;
} else if( *p_value<CONST_MIN ) {
*p_value = CONST_MIN;
}
}
thx.