Random float number generation

rand() can be used to generate pseudo-random numbers in C++. In combination with RAND_MAX and a little math, you can generate random numbers in any arbitrary interval you choose. This is sufficient for learning purposes and toy programs. If you need truly random numbers with normal distribution, you’ll need to employ a more advanced method. This will generate a number … Read more

This declaration has no storage class or type specifier in C++

This is a mistake: That code has to go inside a function. Your class definition can only contain declarations and functions. Classes don’t “run”, they provide a blueprint for how to make an object. The line Message m; means that an Orderbook will contain Message called m, if you later create an Orderbook.