
C++에서 파일 입출력 헤더 파일 : 파일 입출력 작업을 위한 헤더 파일. ifstream: 파일에서 읽기 위한 입력 파일 스트림. ofstream: 파일에 쓰기 위한 출력 파일 스트림. fstream: 읽기와 쓰기 모두를 위한 파일 스트림. 파일 스트림은 , 조정자(manipulator) 등을 지원한다. 파일 열기 open() 메서드 fin.open("HelloWorld.txt", ios_base::in | ios_base::binary); 모드 플래그 in, out, ate (끝에서), app (덧붙이기), trunc (재설정 및 쓰기), binary. 파일 닫기 ifstream fin; /* 코드 */ fin.close(); 스트림 상태 확인 close(): 각 스트림마다 사용 가능한 닫기 메서드...