I was wondering why this array initialization won't compile.
const int ORDERS = 10;
the error is : invalid index value
I would like to set 10 to a input variable but I can't even get it to work like this.
any help would be much appreciated thanks
1) To set the size of a dynamic array with a variable(!) you have to use ArraySize(orderTicketArr,ORDERS)!
2) If you want to set the array size at definition you can use either an integer number like 10:
or by #define:
#define ORDERS 10
To add comments, please log in or register