#include <iostream>
void foo(int i)
{
std::cout<<"Integer foo: ";
std::cout<<i<<std::endl;
}
void foo(char *c)
{
std::cout<<"Pointer foo: ";
std::cout<<c<<std::endl;
}
int main(int argc, char *argv[])
{
char *pc = nullptr;
int *pi = nullptr;
//bool b = nullptr;//false
//int i = nullptr;//error
char c[] = "Hello";
foo(c);
foo(nullptr);//pointer foo is called, instead of integer foo
return 0;
}