• + 1 comment

    you need to use vector instead of array for memory allocation at runtime else if you are using array they you have to use dynamic array.