Dynamic Object in C++?

后端 未结 5 487
野的像风
野的像风 2021-01-24 14:12

I realize that I\'ll most likely get a lot of \"you shouldn\'t do that because...\" answers and they are most welcome and I\'ll probably totally agree with your reasoning, but I

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-24 14:29

    C++Script is what you want!

    Example:

    #include 
    
    var script_main(var args)
    {
        var x = object();
        x["abc"] = 10;
        writeln(x["abc"]);
        return 0;
    }
    

    and it's a valid C++.

提交回复
热议问题