[C++ Basic] Casting

c++

서론 이번시간에는 Casting이라는 개념에 대해서 학습해 보도록 하겠다. 하지만 그 전에 Composition과 Aggregation의 차이에 대해서 먼저 알아보자. 1. Composition 상속이 아니라 멤버 변수에 포함을 시켜서 (Part-on) 클래스를 종속시키는 방법이다.생명주기를 포함하기 때문에 두 클래스의 생명주기가 일치한다는 특징이 있다. 이렇게 보면 MonsterA가 Character이랑 Monster를 상속받지 않고 가지고 있는걸 확인할 수 있다. MonstaerA객체가 사라지게 되면 자연스럽게 Character이랑 Monster도 … Read more

[C++ Basic] Reference, Template, Allocate

c++

Introduction To study C++ basics, you need to understand the fundamental differences from other languages. These differences lie in memory management, handling original variables, and dealing with addresses. We will be learning about these concepts in C++, C++ Basics: The Difference Between Static Allocation and Dynamic Allocation. Since this is a very basic concept that you must know, yet can still be confusing, I will organize it. Static allocation and dynamic allocation are related to compilation, ... Read more