Can someone help me to explain this:
I declare a constant in the headerfile:
const int INCRSIZE; Then in the MIL the constant is initialized:
: INCRSIZE(10) then later on in a function in the code (its a callback-function used in a gtkmm-GUI
bool MyWindow::on_drawing_expose_event(GdkEventExpose* event) I allocate an array on the stack using this constant
double arrPxStep[INCRSIZE]; when I compiling i get the following errors:
-expected constant expression - cannot allocate an array if constant size 0 - arrPxStep unknown size I know the constant is initialzed - how come the array cannot use this constant memeber-variable that was alreade initialized in the MIL?