Skip to main content
deleted 15 characters in body
Source Link
Loki Astari
  • 266.4k
  • 87
  • 344
  • 574

I think you can just do

std::string s;
s.assign( MyVector.begin(), MyVector.end() );

where MyVector is your std::vector.

I think you can just do

std::string s;
s.assign( MyVector.begin(), MyVector.end() );

where MyVector is your std::vector.

I think you can just do

std::string s( MyVector.begin(), MyVector.end() );

where MyVector is your std::vector.

Source Link
LiMuBei
  • 3.1k
  • 25
  • 27

I think you can just do

std::string s;
s.assign( MyVector.begin(), MyVector.end() );

where MyVector is your std::vector.