// Example of evil overloaded functions -- children don't try this at home #include using namespace std; class A { public: A operator+ () { cout << "A\n"; return *this; } }; class B { public: B operator+ () { cout << "B\n"; return *this; } }; int main() { int i = 1; cout << +i << endl; A a; +a; B b; +b; i = i+1; cout << +i << endl; }