F.ex:
#include <string>
#include <iostream>
int main()
{
std::string Name = "Bill Gates";
std::string::size_type n = Name.find_first_of(" ");
if(n != std::string::npos)
{
std::string FirstName = Name.substr(0, n);
std::string LastName = Name.substr(n + 1);
std::cout << "First:" << FirstName << std::endl;
std::cout << "Last:" << LastName << std::endl;
}
}