• Advertisement
Sign in to follow this  

Converting Char Arrays to Strings

This topic is 4947 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

There's times when strings are extremely nice to use for doing certain tasks. The only problem I noticed with windows is it bitches when you use them. So I have the character array, can I convert it to a second variable as a string?

Share this post


Link to post
Share on other sites
Advertisement
std::string sBuffer(cBuffer);
or
std::string sBuffer(cBuffer, cBuffer+100);
or
std::string sBuffer(cBuffer, 100);

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement