일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 플러터
- C# delegate
- 유니티
- c언어
- Flutter
- github
- HTML
- docker
- c# 추상 클래스
- dart 언어
- Houdini
- Data Structure
- Unity
- jupyter lab
- C언어 포인터
- gitlab
- jupyter
- 깃
- c# 윈폼
- vim
- 구조체
- git
- C++
- Algorithm
- Python
- 다트 언어
- 도커
- c#
- c# winform
- 포인터
Archives
- Today
- Total
목록c++ 가상 소멸자(Virtual Destructor) (1)
nomad-programmer

가상함수 말고도 virtual 키워드를 붙여줘야 할 대상이 하나 더 있다. 그것은 바로 '소멸자'이다. 즉, virtual 선언은 소멸자에도 올 수 있다. 가상 소멸자(Virtual Destructor) virtual로 선언된 소멸자를 가리켜 '가상 소멸자'라 부른다. 다음의 예를 살펴보자. #include #include #pragma warning(disable: 4996) using std::cout; using std::cin; using std::endl; class First { private: char* strOne; public: explicit First(const char* str) { cout
Programming/C++
2021. 2. 2. 01:13