2009년 10월 9일 금요일

unordered_map

빠른 맵..

소스)
#include "stdafx.h"
#include <boost/variant.hpp>
#include <boost/unordered_map.hpp>
using namespace std;
using namespace boost;

int main()
{
typedef unordered_map<int, string> Table;
Table table;
table[0]="apple";
table[1]="pear";

cout<<table[0]<<endl;

return 0;

}

실행)
apple

댓글 없음:

댓글 쓰기