// you'll need these #include #include // This call should be made in the skiplist constructor -- it initializes // the random number generator. time_t tp; time(&tp); // get the system time int seed = tp; // use it as a seed for srand(seed); // the random number generator // method to generate a random coin flip, 0 or 1 are output with // 50% chance each int coin_flip() { return (rand()%2); }