I cannot understand the difference between for (int x; cin>>x;) v.push_back(x); and for(int &x ; v;) cin>>x in vector

后端 未结 0 977
说谎
说谎 2021-01-26 19:13
int n  , d ;
    cin>>n>>d;
    vector v(n);
   for (int x; cin>>x;) 
     v.push_back(x); 

this is the code I wrote and if

相关标签:
回答
  • 消灭零回复
提交回复
热议问题