Why can't I do this? It's used in this example: http://www.parashift.com/c++-faq-lit...html#faq-16.21 Or am I missing the point in overloading operator->?
Code:struct a { a() : one(1), two(2) {}; int one; int two; }; class b { public: b() {}; a operator->() { return m_a; } private: a m_a; }; int main() { b myb; cout << myb->one; return 0; }