I have such a class method
class IOManager { public: std::vector<std::string> getWordsFromString(std::string line) { std::vector<std::string> StringVect; //code return StringVect; } }; And it is used in the child class like this:
class ConsolIOManager : public IOManager { public: void SetHashTable(IOManager *obj, std::unordered_map<ull, std::string>& HashTable) override { for (auto &It : obj->getWordsFromString(obj->getText())) { //code } } } What is the best way to return a vector in this case ? Under the link or as in the current code copying?