Replaced variable length arrays with dynamically allocated ones
Variable length arrays are not supported by C++ yet