파일 출력 썸네일형 리스트형 ofstream 클래스명 클래스 이름은 ofstream이다. 아무래도 Out File Stream의 약자일 것 같다. 기능 ofstream 클래스는 파일 쓰기 기능을 한다. 헤더 ofstream 클래스는 fstream 헤더를 포함해야 사용할 수 있다. 그리고 fstream 헤더 내부의 std 네임스페이스 안에 있는 것 같다. using std::ofstream 선언을 해줘야 사용할 수 있기 때문이다. 사용 예제 1 #include //endl 을 위한 헤더 #include //ofstream 을 위한 헤더 using std::endl; using std::ofstream; int main(void) { ofstream test("output.txt"); //파일 개방 for (int i = 0; i < 10; i++) .. 이전 1 다음