Changing a constant
by Erik Madison · in Torque Game Engine · 03/26/2004 (3:20 pm) · 3 replies
Basic coding question, I can't seem to remember how to do this....
TSShape const* mShape= object->getShape();
mShape->objects[i].xxxxxx = true;
error: L-value specifies const object.
I really need to set xxxxxxx (super secret value :)) from within code.
TSShape const* mShape= object->getShape();
mShape->objects[i].xxxxxx = true;
error: L-value specifies const object.
I really need to set xxxxxxx (super secret value :)) from within code.
About the author
Torque Owner John Vanderbeck
VanderGames
Constants allow the compiler to optimze the variable because it is guarunteed not to change.