[C++] pointer와 reference

null을 허용하는가

포인터(*)는 null을 허용한다
레퍼런스(&)는 null을 허용하지 않는다

할당과 접근

포인터(*)는 주소를 할당한다
레퍼런스(&)는 참조 대상을 할당한다

Author: Song Hayoung
Link: https://songhayoung.github.io/2020/08/03/Languages/Cplusplus/pointer-reference/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.