I wanted to know the difference between :
for(auto i : vector ){
cout << i << " ";
}
And :
for( auto &i : vector){
cout << i << " ";
}
It would be helpful if someone points out the difference between these two Thanks ! :)
I wanted to know the difference between :
for(auto i : vector ){
cout << i << " ";
}
And :
for( auto &i : vector){
cout << i << " ";
}
It would be helpful if someone points out the difference between these two Thanks ! :)