#include <cstdlib> class CDummy { public: CDummy():m_nIndex(0) {} explicit CDummy(int mIndex): m_nIndex(mIndex) {} operator int () const { return m_nIndex; } private: int m_nIndex; }; int main() { CDummy dummy1(rand()), dummy2(rand()), dummy3(rand()); bool bJustForExample = dummy1 + dummy2 < dummy3; bJustForExample = dummy1 - dummy2 > dummy3; bJustForExample = dummy1 * dummy2 != dummy3; bJustForExample = dummy1 / dummy2 == dummy3; return 0; }