teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

誤字

2019/09/25 06:10

投稿

the_hoots_under
the_hoots_under

スコア33

title CHANGED
File without changes
body CHANGED
@@ -7,14 +7,14 @@
7
7
  とりあえず、以下の関数が正しいかまずいかお教えいただけますでしょうか。
8
8
 
9
9
  ```ここに言語を入力
10
- void allocate_arr(int **arr,int N){
10
+ void allocate_arry(int **arry,int N){
11
11
  arry = new int*[N];
12
12
  for (int i=0;i<N;i++){
13
13
  arry[i] = new int[N];
14
14
  }
15
15
  }
16
16
 
17
- void delete_arr(int **arr,int N){
17
+ void delete_arry(int **arry,int N){
18
18
  for (int i = 0; i < N; i++) {
19
19
  delete[] arry[i];
20
20
  }
@@ -24,8 +24,8 @@
24
24
  int main(){
25
25
  int **arr;
26
26
  int N = 10;
27
- allocate_arr(arr,N);
27
+ allocate_arry(arry,N);
28
-   delete_arry(arr,N)
28
+   delete_arry(arry,N)
29
29
  return 0;
30
30
  }
31
31