Notice
Recent Posts
Recent Comments
Link
목록#4 (1)
오븐 노트
[C++] vector #4
vector와 iterator의 일부 기능 구현 #include using namespace std; #include template class Iterator { public: Iterator() : _ptr(nullptr) { } Iterator(T* ptr) : _ptr(ptr) { } Iterator& operator++() // 자기 자신의 참조를 뱉어주는 전위형 { _ptr++; return *this; //int a = 1; //int b = ++(++a); // 자기 자신의 참조를 뱉어주는 형태 } Iterator operator++(int) // 복사된 값을 뱉어주는 후위형 { Iterator temp = *this; _ptr++; return temp; //int a = 1; //int..
Develop/C++
2023. 5. 31. 05:47