Im having trouble with the random generator. It only displays "heads" first.
I'm also having trouble with the counting how many times each side has been displayed, I know im going to use a for loop but I cant think of how to format it.
Re-seeding the rng each time flip is called.
Not keeping track of the number of heads and tails.
Failing to initialise the member variable Sideup.
Relying on the randomness of a particular bit in numbers generated by a poor rng.
OK thank you so seeding in done in main to assure its only done once? also what makes a poor rng? I'm asking because the only examples I found were using the modulus 2 form.
> seeding in done in main to assure its only done once?
Yes.
Also, components other than main() shouldn't make program-wide policy decisions (like how a shared rng is seeded).
> also what makes a poor rng?
There are no guarantees as to the quality of the random sequence produced. In the past, some implementations of rand() have had serious shortcomings in the randomness, distribution and period of the sequence produced (in one well-known example, the low-order bit simply alternated between 1 and 0 between calls).
rand() is not recommended for serious random-number generation needs, like cryptography. It is recommended to use C++11's random number generation facilities to replace rand(). http://en.cppreference.com/w/cpp/numeric/random/rand