#include
#include#includeusing namespace std;
int main()
{
int a1 = 1;
int a2 = 2;
int a3 = 3;
std::unordered_map tools;
tools[1] = &a1;
tools[2] = &a2;
tools[3] = &a3;
std::cout << "修改前" << endl;
for(int i = 1; i <= 3; i++){
printf("%d\n",*(tools[i]));
}
std::cout << "修改后" <
关注
打赏
C++ 动态取变量
立即登录/注册
微信扫码登录
