You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
iterator를 가지고 begin(), end() 메소드를 멤버로 가진 collection 데이터 타입은 아래와 같은 for 문이 가능하다고 합니다.
for (auto& iter : coll) {
iter->do_something();
}
std::array
C++11부터 std::array라는 것이 생겼습니다. 일단은 동적으로 크기를 조절할 수 없다는 것 외에 std::vector와 거의 유사하게 동작한다고 합니다.
std::unique_ptr
메모리가 스코프에서 벗어날 때 자동으로 메모리 해제를 수행하는 스마트 포인터의 일종입니다. 기존의 std::auto_ptr는 deprecated 되었으니 이놈을 사용하면 됩니다. boost에는 shared_ptr가 있는데 다들 이게 제일 좋다고 합니다. 자세한 사항은 다음 링크를 보시죠. http://en.wikipedia.org/wiki/Smart_pointer