There is something wrong in your assumptions. Try
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
std::vector<string> Split(string str);
int main()
{
string hey = "hello hello wassup";
vector<string> arr;
arr = Split(hey);
for (const auto & s : arr)
cout << s << "\n";
}
vector<string> Split(string str)
{
istringstream iss(str);
vector<string> ret;
while ( iss )
{
string s;
iss >> s;
if ( ! s.empty() )
ret.push_back(s);
}
return ret;
}