Write two overloaded functions with the same name but different parameter types:
void foo(int x);
void foo(int* p);
The goal is to demonstrate how overload resolution behaves differently for integer literals and nullptr in modern C++.
The program will explicitly call:
foo(0);
foo(nullptr);
You only need to implement the two overloads so that each prints which overload was selected.
foo(int) must print:foo(int*) must print:
Example Output:
int overload
int* overload