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

1. 변환 연산자와 변환 생성자 1-1. 변환 연산자#include class Int32;{ int value;public: Int32() : value(0) { } operator int() const { return value; }};int main(){ int pn; // primitive type Int32 un; // user type pn = un; // un.operator int() un = pn; // pn.operator Int32() 이는 불가능 // 1. un.operator=(pn) // 2. Int32(pn)}- 객체가 다른 타입으로 변환 될 때 호출되는 함수이다. operator TYPE(){..
C++/Intermediate
2024. 9. 13. 22:21