Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- std::endl
- base from member
- virtual inheritance
- vector size
- member function pointer
- dynamic_cast
- operator overloading
- virtual destructor
- std::vector
- c++ basic practice
- c++ multi chatting room
- conversion constructor
- this call
- diamond inheritance
- return by reference
- pointer to member data
- std::ostream
- suffix return type
- constructor
- new&delete
- discord bot
- std::cout
- vector capacity
- C++
- delete function
- 더 지니어스 양면포커
- increment operator
- placement new
- virtual function table
- virtual function
Archives
- Today
- Total
목록this call (1)
I'm FanJae.

1. this call 1-1. 멤버 함수의 의문점.class Point{ int x{0}; int y{0};public: void set(int a, int b) { x = a; y = b; }};int main(){ Point pt1; Point pt2; pt1.set(10, 20); pt2.set(10, 20);}- 멤버 데이터는 객체당 한 개씩 생성된다.- 멤버 함수는 코드 메모리에 한 개만 만들어져 있다. - 객체가 여러 개 생성되어도 멤버 함수는 한 개만 있다.※ 함수 인자는 2개 (a, b) 밖에 없는데, x가 어떤 객체의 멤버 인지(pt1.x인지 pt2.x 인지) 어떻게 아는가? 1-2. 어떤 변환이 일어나는가?clas..
C++/Intermediate
2024. 9. 22. 19:49