STL 함수 이용 텍스트 파일 읽기
종종 쓰지만 생각이 잘 안나는 경우가 있어 기록해 놓는다.
std::stringstream ss;
std::ifstream ifs;
ifs.open(strFilePath, std::ifstream::binary | std::ifstream::in);
if (ifs.is_open()) {
ss << inConfig.rdbuf();
}
std::string strText = ss.str();
뭐 이런식으로
'C,C++' 카테고리의 다른 글
Template Point Rect (0) | 2016.05.13 |
---|---|
메모리 누수 (클래스 상속) (0) | 2016.04.28 |