본문 바로가기
01.Bit 단기/C

27_파일IO기본코드

by chojju 2018. 4. 28.
반응형

#include <stdio.h>

/*
1.  파일 열기
2.  파일 사용................
3.  파일 닫기
*/
/*
void fun_read()
{
 FILE * in = fopen("aaa.txt", "r");
 if (in == NULL)
 {
  printf("파일 열기 실패\n");
  return;
 }
 //==========================================

 //===========================================

 fclose(in);
}

void fun_write()
{
 FILE * in = fopen("aaa.txt", "a");
 if (in == NULL)
 {
  printf("파일 열기 실패\n");
  return;
 }
 //==========================================

 //===========================================

 fclose(in);
}

int main()
{
// fun_read();
// fun_write();

}
*/

 

반응형

'01.Bit 단기 > C' 카테고리의 다른 글

29_파일복사  (0) 2018.04.28
28_파일IO문자전용  (0) 2018.04.28
26_typedef사용법  (0) 2018.04.28
25_구조체실습, 비트필드, 공용체  (0) 2018.04.28
24_구조체포인터및인자전달  (0) 2018.04.28

댓글