Hi,
I have a question regarding vectors.
I have declared a vector of strings as
vector<string> str;
and my input into the vector str is:
str[0] = A
str[1] = B
str[2] = C
is there any method, by which I can join the above three vector elements into one string as "ABC" and push back into the same vector or another vector.
else
if my vector consists as follows : str[0] = ABC, is there a function or method by which I can split the string ABC into A, B, C and store it in the same or another vector.
Thanks!!
I have a question regarding vectors.
I have declared a vector of strings as
vector<string> str;
and my input into the vector str is:
str[0] = A
str[1] = B
str[2] = C
is there any method, by which I can join the above three vector elements into one string as "ABC" and push back into the same vector or another vector.
else
if my vector consists as follows : str[0] = ABC, is there a function or method by which I can split the string ABC into A, B, C and store it in the same or another vector.
Thanks!!
Comment