I'm trying to combine all the elements inside a vector as a new string but I can't get the example how to do this. Most of the examples are concatenating between vectors and also in C++ std::cout
. I'm not sure how to do it in MFC VC++.
Let's say I have a vector (in CString) with the elements I am
a naughty
boy
. How can I combine them and saved them as a
CString str;
str = "I am a naughty boy"
Edited:
struct REVLISTDATA {
CString str_;
REVLISTDATA(CString str_element) : str_(str_element) {}
};
std::vector<REVLISTDATA> vec;