c++中返回數組函數

c++中返回數組函數 演示代碼: int * fun1() { int arr[10]; for(int i=0; i<10; i++) { arr[i]=i; } return arr; } int * fun2() { int *arr=new int[10]; for(int i=0; i<10; i++) {
相關文章
相關標籤/搜索