I have code that copies values from array to vector. But it does not work. In the last line, I get this error:
error: cannot bind 'std::basic_ostream<char>' lvalue to 'std::basic_ostream<char>&&'
cout << "s: " << tv << endl;
^
int t[] = {1,2,3,4,5};
vector<int> tv;
for (int i=0;i<5;i++)
tv.push_back(i);
for (int v: tv)
cout << "s: " << tv << endl;
cout << "s: " << v << endl;Typo in the last line.