일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- std::vector
- 더 지니어스 양면포커
- virtual function
- c++ basic practice
- this call
- member function pointer
- base from member
- C++
- c++ multi chatting room
- new&delete
- std::cout
- vector capacity
- pointer to member data
- virtual function table
- virtual inheritance
- std::ostream
- diamond inheritance
- virtual destructor
- conversion constructor
- operator overloading
- delete function
- suffix return type
- placement new
- dynamic_cast
- constructor
- return by reference
- vector size
- increment operator
- discord bot
- std::endl
- Today
- Total
목록2024/08/22 (2)
I'm FanJae.
※ 본 포스트는 코드누리 C++ Basic 강의 내용을 보고 정리한 포스트입니다. 1. RTTI (Run Time Type Information)#include #include int main(){ int n1 = 10; auto n2 = n1; // n2의 타입은? int const std::type_info& t1 = typeid(n2); std::cout - 실행시간에 타입의 정보를 얻을 때 사용하는 기술이다. 1-1. RTTI 기술의 사용법- 헤더를 사용한다.- typeid 연산자를 사용한다.- 타입의 정보를 담은 type_info 객체를 얻을 수 있다.- type_info 객체의 멤버 함수 name()을 사용 ① Typeid#include #include i..

※ 본 포스트는 코드누리 C++ Basic 강의 내용을 보고 정리한 포스트입니다. 1. 가상 함수에 대한 의문점class Base{ int bm{0};public: virtual void f1() {} virtual void f2() {} virtual void f3() {}};class Derived : public Base{ int dm{0};public: void f2() override {}};int main(){ Base base; Dervied derived; Base *p = &derived; p->f2();}- 지난 시간 가상 함수에 대해 다뤘다.- 이때, p->f2(); 에서 어느 함수를 호출 할 것인가에 대한 이야기이다. - ..