CMap的一个使用例子
#include "stdafx.h"
#include "test.h"
#include <afxtempl.h>
#include <iostream>
using namespace std;
class Point
{
public:
public:
};
typedef CMap<const char*, const char*, Point, Point&>
int main()
{
// insert a new pair into map
Point elem4(4, 400);
mp["4th"] = elem4;
cout<<"count: "<<mp.GetCount()<<endl;
// traverse the entire map
size_t index = 0;
const char* pszKey;
POSITION ps = mp.GetStartPosition();
while( ps )
{
}
return 0;
}
浙公网安备 33010602011771号