Notice»

Recent Post»

Recent Comment»

Recent Trackback»

Archive»

« 2024/4 »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

#include <iostream>
#include <sstream>
#include <fstream>

using namespace std;

int main (int argc, char **argv)
{
fstream stream;
stream.open("c:\\install.ini", ios::in);

if ( stream.is_open() )
{
stringstream ss;

ss << stream.rdbuf(); /* 이 시점에서 ss에 stream에 저장된 모든 내용이 복사됨. */
cout << ss.str() << endl;

ss.clear();
}

stream.close();
    return 0;
}

'프로그래밍 > C, C++' 카테고리의 다른 글

boost  (0) 2009.09.25
ASCII 문자 코드  (0) 2009.04.15
STLport 설치 및 사용 For VC6  (0) 2009.04.06
std::string, boost, CString::Format의 printf() 기능 사용 및 구현  (1) 2009.04.01
: