#include #include #include "myrandom.h" using namespace std; int main() { myrandom1 r1a; myrandom1 r1b = 2014; for (int i = 0; i < 3; ++i) { cout << r1a() << "\t" << r1b() << "\n"; } cout << "\n"; myrandom2 r2a; myrandom2 r2b = 2014; for (int i = 0; i < 3; ++i, ++r2a) { cout << *r2a << "\t" << *r2b++ << "\n"; } cout << "\n"; myrandom3 r3 = 2014; for (int i = 0; i < 3; ++i, ++r3) { cout << "seed == " << r3->seed //r3.operator->()->seed << ", i == " << r3->i << ", random == " << r3->random << "\n"; } return EXIT_SUCCESS; }