C++ 的常用库
map Library
简单用法如下:
typedef pair |
1234 | map |
12 | it->first; // same as (*it).first (the key value)it->second; // same as (*it).second (the mapped value) |
举例:
#include <map>
using namespace std; map <String,TEdit*> map1; map1[ "Edit1 "]=Edit1; map1[ "Edit2 "]=Edit2; map1[ "Edit1 "]-> Text= "aaaaaa "; map1[ "Edit2 "]-> Text= "bbbbbb ";