This is how you can assign <char>vector to std::string when you create the string.
But how do you convert it to a global string? Is it possible or we have to create a second string first?Code:std::vector<char> cVec(length); . . . string str(cVec.begin(),cVec.end());