12-10-2004, 09:16 PM
|
#1
|
|
Member (6 bit)
Join Date: Jul 2003
Location: NY
Posts: 49
|
C++ string and char manipulation
if i have a char[ ] which and the string it represents has 3 integers followed by an unknown number of words, the third integer being the number of characters in the remaining unknown words. is there a simple way to get a char* with the words?
for example
char buffer[500];
where the buffer = "0 1 14 a test string"
is there an easy way to get a char* with "a test string" if the number of digits in the third integer is unknown and the third integer represents the number of characters in the string following it?
I was trying to do it with sscanf, but couldn't figure out how to scan in a string containing whitespace.
|
|
|