
Originally Posted by
greenismn
Hello, I am having trouble with this code for a game that must use classes.
So you wrote this whole thing without compiling it once?
Code:
#include <time>
#include <math>
1) There are no such headers in standard C++. The headers are <ctime> and <cmath>. This is why you always compile during development of code, so that simple things like this are found out immediately.
2) Remove the header <cstdlib>
3) This is illegal, as function definitions must define a return type:
Code:
class Randomization
{
public:
int generate_random_number();
private:
double random_number;
};
Regards,
Paul McKenzie