c map拷贝赋值到另一个map, demo代码如下:
#include
#include
方法二
struct a
{
int a;
int b;
};
typedef map amap;
a a;
amap amap1,amap2;
amap1[1]=a1;
amap1[2]=a2;
amap1[3]=a3;
amap2.insert(amap1.begin(), amap1.end());
c map拷贝赋值到另一个map, demo代码如下:
#include
#include
方法二
struct a
{
int a;
int b;
};
typedef map amap;
a a;
amap amap1,amap2;
amap1[1]=a1;
amap1[2]=a2;
amap1[3]=a3;
amap2.insert(amap1.begin(), amap1.end());