Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ split string by space into array

Astringstream associates a string object with a stream allowing you to 
read from the string as if it were a stream (like cin). To use stringstream, 
we need to include sstream header file. 
The stringstream class is extremely useful in parsing input.

in the cp when u need to remove spaces from the string and store it into the 
vector or other type  of data structure at that it will be your 
first choice out there.
Source by www.quora.com #
 
PREVIOUS NEXT
Tagged: #split #string #space #array
ADD COMMENT
Topic
Name
1+8 =