本文介绍了如何在Mac M1上配置VScode以支持C++环境,特别是在遇到编译错误'non-aggregate type ‘vector’ cannot be initialized with an initializer list'时,详细解析了错误原因并提供了解决方案——将编译环境设置为C++11。
VScode for m1配置 以及 解决non-aggregate type ‘vector<int>‘ cannot be initialized with an initializer list
VScode for mac m1配置C++环境参考解决C++编译,non-aggregate type ‘vector’ cannot be initialized with an initializer list的问题问题发现写代码过程中,发现在vector初始化时,使用大括号初始化无法通过编译vector<int> vec = {1, 2, 3, 4, 5};报错:non-aggregate type ‘vector’ cannot be initialized with a