怎么使用map?
using namespace std;
typedef map<string, int> BossMap;
extern map<string, int> mapBoss;
mapBoss.insert(BossMap::value_type("Test", 1));
怎么报了一大堆错?
E:\Unlimited\MainDll\MainDllDlg.cpp(1593) : error C2955: 'map' : use of class template requires template argument list
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\MAP(140) : see declaration of 'map'
E:\Unlimited\MainDll\MainDllDlg.cpp(1593) : error C2663: 'insert' : 3 overloads have no legal conversion for 'this' pointer
没有这句mapBoss.insert(BossMap::value_type("Test", 1));
就没有错