unsigned longitud;
cin >> longitud;
vector<char> palabra(longitud);
for (unsigned i = 0; i < palabra.size(); i++, letra += 1)
{
palabra[i].push_back ('a') << " ";
}
The error i get:
error: request for member `push_back' in `(&palabra)->std::vector<_Tp, _Alloc>::operator[] [with _Tp = char, _Alloc = std::allocator<char>](i)', which is of non-class type `char'
I don't even understand what this error is saying :-/