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) {
void fun() { // calculate what ptr value should be const char* ptr = /*...*/; // now handle ptr normally fun(ptr); }