i have a recursive function that return a vector
and the problem is when the function recall itself it make some copy of variables and vector then return that vector
so if i need all data i need to somehow push the return vector into main vector...
for example i have sth like
when i useCode:std::vector<std::string> test(char *root) { std::vector<std::string>pointer; ...//some function and loops test(variable); return pointer }
pointer.push_back(test(variable));
instead of
test(variable);
give me error that
no matching function for call to 'std::vector<std::basic_string<char>
>:/push_back(std::vector<std::basic_string<char> >)'|