How do I go about fixing these three errors?
error C2057: expected constant expression
You can't declare randomTickets
like that because the dimensions of the array need to be known at compile time. tickets
is not a compile time constant and therefore you have the error. Consider using std::vector
std::vector> randomTickets(tickets, std::vector(SIZE));
Alternatively, you can nest a std::array
since SIZE
is constant and known at compile time:
std::vector> randomTickets(tickets);
The other errors are resolved by fixing this one.