How do I go about fixing these three errors?
Variable tickets
is not a constant expression, that's why.
Change int randomTickets[tickets][SIZE]
as follows:
Array* randomTickets = new Array[tickets];
Outside of function main
, declare the following type:
typedef int Array[SIZE];
You can use variable randomTickets
as a "normal" 2-dimensional array from this point onwards, just don't forget to delete[] randomTickets
when you're done...