Redundant addresses for C++ arrays static memory allocation in an array

前端 未结 0 488
暖寄归人
暖寄归人 2021-01-21 17:39

Why does C++ use the same memory location for statically initializing an array?

for(int i=0; i<2; i++)
{
    int* arr1 = new int[2];
    int arr2[2];
    
             


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题