map memcpy
jijidawang · · 个人记录
#include <bits/stdc++.h>
using namespace std;
const int M = 1e6 + 233;
map<int, int> a[100], b[100];
char buffer[M];
int main()
{
int n = 10;
a[0][1] = 3;
b[0][1] = -1;
a[1][1] = 4;
b[1][1] = 5;
memcpy(buffer, b, sizeof(*b) * n);
memcpy(b, a, sizeof(*a) * n);
cout << b[0][1] << endl;
memcpy(b, buffer, sizeof(*b) * n);
return 0;
}
Output: 3
非常的新鲜 非常的美味