2022-1

데이터 구조 call by reference

오로시 2022. 4. 26. 00:04

1. sub (x) ; --> void sub(int y)

2. sub (&x); --> void sub(int *p)

 

reference parameters

두 번째의 목적으로 쓰되, 형식을 단순화한 개념

sub(x) --> void sub(int &y) y의 변화가 x에 반영됨 

call by reference