Suppose I have this code. Your basic \"if the caller doesn\'t provide a value, calculate value\" scenario.
void fun(const char* ptr = NULL) { if (ptr==NULL) {
You should use the nullptr for that. Its new in the C++11 standart. Have a look here for some explanation.