I'm just learning C++ for the first time. I have been programing in java for about 2 - 3 years and C for about 1 year. I'm wondering what is the difference between
In the first case, the array will automatically be destroyed/freed after you exit the scope.
In the second case, you will have to delete it manually using delete array; however, the pointer WILL be destroyed after you exit the scope, which means you won't be able to delete the memory if you don't have a pointer to it.