Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access each member of a std::string?

Tags:

c++

string

How can I access each member in a std::string variable? For example, if I have

string buff;

suppose buff conatains "10 20 A" as ASCII content. How could I then access 10, 20, and A separately?

like image 636
balasaheb Avatar asked Dec 08 '25 06:12

balasaheb


1 Answers

Here is an answer for you on SO:

How do I tokenize a string in C++?

There are many ways to skin that cat...

like image 60
jmq Avatar answered Dec 09 '25 18:12

jmq