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