I have a
vector<char> sectionData;
and I would like to see its content.I try the following
string sectionDataStr = string(sectionData.begin(),sectionData.end());
But I get only part of the sectionData presented in the string,since sectionData contains zeros.What can I do,if any case I want to read entire data to string?
I can`t use std::cout
Thanks
Your problem doesn’t exist. Here’s a simple demonstration:
Now inspect the output:
As you can see, it’s all there.
Alternatively (following your edit):