#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <conio.h>
#include <algorithm>
usingnamespace std;
int main (void)
{
char inpt[256];
string surname ; // i want to receive only the surname
string name; // the name is correct
cout << "Enter your surname and name: "
gets(inpt); //use the example "Lucky Luke".
surname = inpt; // i want the surname.
name = inpt + 6 ; // name is correct
cout << name << "\n";
cout << surname << "\n";
cout << "\n\n" ;
system("PAUSE"); //sorry for using that
return 0;
}
Which function do i need in order to keep or save only the surname ? (which in this case is Lucky)