I have input like this:
1581 303 1127 Bravo
I want to put it into strings like this:
string a="1581 303 1127"; string b="Bravo";
How can i do that?
Based on the fact that you take first three as int and last as string do it like this.
int i1, i2, i3; //Take input in three integers sprintf(a, "%d %d %d", i1, i2, i3);
1.4m articles
1.4m replys
5 comments
57.0k users