Witam, mam taki kod:
void mergeData(const vector < string > data, const vector < string > dataToMerge)
{
data.clear(); // ERROR: the object has type qualifiers that are not compatible with the member function "std::vector<_Ty, _Alloc>::clear [with _Ty=std::string, _Alloc=std::allocator<std::string>]"
for (int i = 0; i < dataToMerge.size(); i++)
{
for (int j = 0; j < dataToMerge[i].size(); j++)
{
supportVariable = "";
supportVariable += dataToMerge[i][j];
if (j != dataToMerge.size() - 1) supportVariable += "|";
}
data.push_back(supportVariable); //ERROR: no instance of overloaded function "std::vector<_Ty, _Alloc>::push_back [with _Ty=std::string, _Alloc=std::allocator<std::string>]" matches the argument list and object (the object has type qualifiers that prevent a match)
}
}
Nie rozumiem dlaczego to nie działa ;(