#include<iostream>
#include<fstream>
using namespace std;
int main(){
fstream f(FILENAME, fstream::in );
string s;
getline( f, s, '\0'); //파일 전체를 한번에 읽는다
cout << s << endl;
f.close();
}
'프로그래밍' 카테고리의 다른 글
[linux] 실행파일 또는 정적라이브러리 빌드후 플랫폼 버전 확인 명령어 (0) | 2015.07.23 |
---|---|
[C/C++] 파일 입출력 std::wfstream UTF-8 파일 읽기 (0) | 2015.07.05 |
How to handle Windows DACL and SACL (SecurityAttribute Structure) (0) | 2015.05.27 |
[C/C++] 파일 입출력 방식 속도비교 테스트 (0) | 2015.04.01 |
운영체제별 개행문자(줄바꿈) 방식의 차이 (0) | 2015.02.26 |