STL 를 사용하다보면 어려운 점 중에 하나가 그 내용을 확인하기가 쉽지 않다는 점입니다. 배열을 사용하면 디버그 watch 창에 그 내용물이 보기 쉽게 표시되는데 배열의 STL 대응인 std::vector 를 사용하면 무슨 내용이 vector 저장되어 있는지 디버깅 시 확인하기가 쉽지 않습니다. 다음과 같이 watch 창에 입력하면 std::vector 의 내용을 확인할 수 있습니다.
01: /* testWatch.cpp : Defines the entry point for the console application. */ 02: 03: 04: #include "stdafx.h" 05: #include <vector> 06: #include <string> 07: 08: struct Student 09: { 10: std::string name; 11: int id; 12: 13: Student(const std::string & _name, const int & _id) : name(_name), id(_id) {…