fixing visual studio warning expected constant expression. use new/delete instead of scoped array notation