您当前的位置: 首页 >  c++

C++ 动态取变量

软件工程小施同学 发布时间:2021-12-26 16:11:53 ,浏览量:5

#include 
#include 
#include 

using 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             
关注
打赏
1688896170
查看更多评论
0.3435s