y*h 发帖数: 107 | 1 In main function, we can declare an array in two ways:
either
int a[100]; //create an array on the stack
or
int* a=new int[100]; //create an array on the heap
What is the difference between those arrays in terms of performance-
wise ?
When should we use the former, and when to use the latter?
thanks |
|