I have an array of chars in c++.for example :
char input[]="I love you";
I want to make a std::string from char[i] to char[j]. for example :
std::string output="love";
What should i do?
You can do this:
char input[]="I love you";
std::string str(input);
here: http://www.cplusplus.com/reference/string/string/string/
if you want only part so write this:
std::string str(input + from, input + to);
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다