有人可以给我提示为什么这段代码没有输出任何东西?我假设它与移动线有关...
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
vector<int> v{66,79,154,24,76,13,7};
v = move(v);
for(auto i: v)
cout << i << " ";
}
Run Code Online (Sandbox Code Playgroud)
更新:所以我添加了系统("暂停"); 帮助自己.我是否需要它并不是我所关注的.当我在Visual Studio 2013中再次运行代码时,它工作正常.但是,当我使用C++ 14运行Ideone时,它没有输出任何内容.现在有点困惑.