MFC ] stringstream 사용하여 문자열 파싱하기
예제코드 CString result; string str = CT2CA(result); istringstream ss(str); string line; int i = 0; while(getline(ss, line, '\n')) { istringstream linestream(line); string cell; getline(linestream, cell, ','); m_list.InsertItem(i, cell.c_str()); int j = 0; while (getline(linestream, cell, ',')) { m_list.SetItem(i, j, LVIF_TEXT, cell.c_str(), NULL, NULL, NULL, NULL); j++; } i++; } '\n' 와 ',' 로 구분하는 형..
2022. 7. 14.