본문 바로가기

알고리즘/기본 문법

<알고리즘> 2차원 배열 수정하는 함수

 

 

 

 

 

코드


#include<bits/stdc++.h>
using namespace std;
void b(int a[][5])
{
	a[0][4] = 44;
}
	
int main()
{
	int a[3][5] = {
		{1, 2, 3, 4, 5},
		{6, 7, 8, 9, 10},
		{11, 12, 13, 14, 15},
	};
	b(a);
	cout << a[0][4] << "\n";
	return 0;
}

/*
44
*/