내 프로그램에 stringstream
변수를 사용하고 있습니다. 다음은 코드입니다 :stringstream은 어떻게 작동합니까?
stringstream keyvalueStream;
keyvalueStream << // appending some string
somefun(keyvalueStream.str().c_str()); // Passing the char*
keyvalueStream.str(std::string()); // clearing the content of this variable.
나는 somefun()
드릴 것입니다 문자열을 keyvalueStream
의 내용에 영향을 삭제합니까?
@ juanchopanza : 객체는'somefun' 만 반환합니다. (전체 표현의 끝) – MSalters
@MSalters 물론입니다. 내 실수. – juanchopanza