|
|
cplusprimer.cpp: In function `int main()': cplusprimer.cpp:12: error: call of overloaded `swap(int&, int&)' is ambiguous cplusprimer.cpp:6: note: candidates are: void swap(Any&, Any&) [with Any = int] /usr/include/c++/3.4/bits/stl_algobase.h:126: note: void std::swap(_Tp&, _Tp&) [with _Tp = int] |
using namespace std;
, you have those 2 functions in basically the same namespace (the global one).using namespace std;
or rename your function.