The ambiguity is caused by `using namespace std` in line 6 up above.