[C++] Shallow Copy vs. Deep Copy
Shallow Copy 객체를 복사할 때 원래값과 복사된 값이 같은 참조를 가리키고 있는 것 객체의 ‘값’만 복사
Shallow Copy 객체를 복사할 때 원래값과 복사된 값이 같은 참조를 가리키고 있는 것 객체의 ‘값’만 복사
복사 생략 Copy Elision
초기화 (Initialization) ```c++ // Must initialize the reference at the first int& ra; // Wrong int& ra = a; // Correct
Read-Only 변수의 값을 변경할 수 없다 메서드에서 클래스의 멤버 변수를 변경할 수 없다
함수의 작동
An integer int a;
함수의 static 변수 함수 안에서 선언된 static 변수 값이 고정됨 multi-thread hardware interrupt timer
C의 malloc과 C++ new의 차이
Class의 사이즈
C/C++ 메모리 레이아웃 Text segment 기계어로 변환된 실행코드가 메모리 or obj에 저장