최근 프로젝트 유지보수를 하면서  파일 입출력을 하게 되었다.

 

기본적인 사용법은 매우 간단했다.

 

#include <fstream> 하고

 

std::ofstream fileOut;

fileOut.open("파일 이름", 추가옵션);

fileOut << "입력할 내용";

fileOut.close();

 

 

그냥 열고 내용 쓰고 닫기가 전부였다.

 

추가적인 내용은

http://www.cplusplus.com/에서 fstream 을 찾으면 될듯.

 

 

<사용한 코드>

 

 

'C++ > 기초' 카테고리의 다른 글

Formatting(cout 서식 설정, 정렬등)  (0) 2021.02.04

+ Recent posts