Response to: Expression must have a constant value
Revision 1
The expression must be constant at compile time. Your code uses a run-time constant. A compile time constant would look like this:
const int x = 5;
Point *Room[x];
To create an array at runtime, use the
new
operator:
Point *Room = new Point[size];
delete [] Room;
Posted 13-Feb-13 0:47am
by
Jochen Arndt.