0

How to separate the fullname "John Doe" and assign "John" to firstname and "Doe"to lastname?

separating fullname in firstname and lastname

22nd Sep 2018, 12:35 AM
Tom
Tom - avatar
2 Réponses
22nd Sep 2018, 12:39 AM
Toni Isotalo
Toni Isotalo - avatar
+ 4
You can use strtok function for that http://www.cplusplus.com/reference/cstring/strtok/ Since strtok is a C language function so it handles character array not strings. To convert string into char array use (string).c_str function http://www.cplusplus.com/reference/string/string/c_str/
22nd Sep 2018, 11:05 AM
blACk sh4d0w
blACk sh4d0w - avatar
Aujourd'hui en vedette
.
1 Votes
What?
0 Votes
HTML
0 Votes
FRC Coding?
1 Votes
Quiz duel
0 Votes
AI
2 Votes
help
0 Votes
APIs
1 Votes
Create Agent
0 Votes