Pointer
-
[자료구조] 1-1. 포인터 Pointer (C/C++)50 shades of ZZ/C(++) 자료구조 마스터 2023. 9. 26. 22:33
pointer 포인터 (= pointer variable) 어떤 변수의 메모리 주소를 저장하는 변수 pointer constant : 메모리 주소에 대응하는 값 pointer가 NULL일 경우, 해당 pointer는 아무것도 가리키지 않음을 의미 (실제 값은 0) x; x라는 이름의 memory storage : storage 크기는 에 따름 (위치 : &x) *p; type이 인 memory storage의 주소를 저장하는 storage의 이름 (= pointer variable) int main(){ int x = 9, *p; p = &x; } // storage의 크기는 컴퓨터시스템에 따라 32 또는 64 bit pointer 예시 *(pointer) : pointer가 가리키는 variable (..