So, I've made this code, and it basically splits up the users input into different strings.
For example
Workspace.Hello.Hey would then be printed out as "Workspace" "Hello" "Hey"
However, I need to know how to define each of those as their own SEPARATE variable that can be called later on. This is the code I have.
std::string str;
std::cin >> str;
std::size_t pos = 0, tmp;
while ((tmp = str.find('.', pos)) != std::string::npos) {
str[tmp] = '\0';
std::cout << "Getting " << str.substr(pos) << " then ";
pos = tmp;
}
std::cout << "Getting " << str.substr(pos) << " then ";