Ok this question probably has a simple answer but I currently can't find any answers on here or google.
I'm relatively new to C but have experience in other programming languages.
I'm writing a program where I need to read in a surname such as "Smith", "Jones" etc.. which is fine, by using scanf i can read these in to my program fine.
However I now need to read in double barrell surnames along with standard ones, so the user may input, "Jones", "Smith Jones", "Smith von Jones" etc...
Bearing in mind that I need to be able to read in any of these three cases from one input string how would I go about this? As scanf stops at whitespaces i cant do that and if I put in multiple clauses it has to be either 1, 2 or 3 words, not an option of the three.
Any help would be appreciated.
Cheers