#include using namespace std; class ForbiddenFruit { public: ForbiddenFruit() { this->m_State = 0; this->showState(); } ForbiddenFruit &operator()() { this->m_State = 1 - this->m_State; this->showState(); return *this; } private: int m_State; void showState() { cout << ((this->m_State) ? "B" : "A") << endl; } }; int main(void) { ForbiddenFruit flandre; flandre()()()()(); return 0; }