Updated code to fix compilation errors.  Variable arrays are implemented as std::vectors