728x90 stringstream1 sstream [stringstream] #include stringstream 설명 sstream 은 string stream 의 약자이다. string stream 는 주어진 어떠한 문자열에서 원하는 자료형으로 정보를 얻을 수 있다. 또한 여러가지 자료형을 가진 데이터들이 들어올 때 효과적으로 관리를 할 수 있다. stringstream 은 저장이 된 문자열에서 공백(' ')과 줄바꿈('\n') 을 기준으로 문자열을 구분하여 처리한다. 1) 문자열에 대해서 띄어쓰기를 기준으로 원하는 자료형으로 분리를 할 수 있다. #include #include using namespace std; int main() { string out; string strInput = "Hello world hello C++"; stringstream s_stream.. 2021. 8. 29. 이전 1 다음 728x90