cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
file reading
file reading
Jan 18, 2020 at 2:50am UTC
ema897
(80)
If have a line:
(.a=m, .b=x,.c=o)
how to extract each token ignoring space, not knowing how long is the line?
Moreover, I have to check if there are strange char, for example:
(.a=m, ;b=x,.c=o)
is not good for ';' char.
Jan 18, 2020 at 3:24am UTC
againtry
(2313)
See:
http://www.cplusplus.com/reference/cstring/strtok/?kw=strtok
There is a more upmarket true C++ (vs C) way of tokenising but this one is there to behold, and the sample program is there to copy and adapt.
Topic archived. No new replies allowed.