Yours cannot be called an array in the first place, it is just a continuous memory space. Your maxArray is just the first address of this space. How does clion know that you want to use this space as an array
So you still have to abandon naked malloc, you should use std::vector
Yours cannot be called an array in the first place, it is just a continuous memory space. Your maxArray is just the first address of this space. How does clion know that you want to use this space as an array
So you still have to abandon naked malloc, you should use std::vector