Ian*_*Ian 27 c++ vector
我是c ++的初学者,每次运行vector<int> nums = {2, 5, 3, 7, 1};它都会给我错误:非arregrate类型向量无法用初始化列表初始化.
vector<int> nums = {2, 5, 3, 7, 1};
你能告诉我为什么吗?
谢谢,
小智 41
g++ -std=c++11 <filename>编译时使用.
g++ -std=c++11 <filename>
Mot*_*art 8
使用上面 Druhv Sehgal 的答案,这对我在 mac 上有用
如果command not found: gcc++尝试
command not found: gcc++
clang++ -std=c++11 <filename>
归档时间:
9 年,10 月 前
查看次数:
15864 次
最近记录:
6 年,9 月 前