파일 목록
- 1-Time1-.c
- 1-로또 프로그램 만들기.c
- 1-성적 평균 계산.c
- 1-소스.c
- 1-예제1.c
- 10-1.c
- 10-2.c
- 10-3.c
- 10-4.c
- 10-5.c
- 10-6.c
- 11-1.c
- 11-2.c
- 11-3.c
- 11-4.c
- 11-5.c
- 11-6.c
- 11-make.c
- 12-1-1.c
- 12-1-2.c
- 12-1-3.c
- 12-1-4.c
- 12-2-1.c
- 12-2-2.cpp
- 12-2-3.c
- 12-2-4.c
- 12-2-5.c
- 13-1.c
- 13-2.c
- 13-3.c
- 13-4.c
- 13-5.c
- 13-6.c
- 13-make.c
- 14-1-main.c
- 14-1-power.c
- 14-1-power.h
- 14-2-rect.c
- 14-2-rect.h
- 14-2-rect_main.c
- 14-2-소스.c
- 14-2-소스1.c
- 14-main.c
- 14-reserv.c
- 14-reserv.h
- 2-DICE.c
- 2-minimum.c
- 3-TIC_TAC_TOE.c
- 4-1.c
- 4-2.c
- 4-3.c
- 4-Point.c
- 4-주소.c
- 5-1.cpp
- 5-2.c
- 5-3.c
- 5-4.c
- 5-5.c
- 5-6.c
- 5-7.c
- 6-1.c
- 6-2.c
- 6-3.c
- 6-4.c
- 6-5.c
- 6-6.c
- 6-7.c
- 6-8.c
- 6-make.c
- 7-1.c
- 7-10.c
- 7-11.c
- 7-12.c
- 7-2.c
- 7-3.c
- 7-4.c
- 7-5.c
- 7-6.c
- 7-7.c
- 7-8.c
- 7-9.c
- 7-make.c
- 8.c
- 9.c
- sil1.c
- sil2.c
- sil3.c
- Title.png
- 성적받아오기).c
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
FILE *src_file, *dst_file ;
char filename[100];
char buffer[1024];
int r_count;
printf("이미지파일 이름 : ");
scanf("%s", filename);
src_file = fopen(filename, "rb");
dst_file = fopen("copy.jpg", "wb");
if (src_file == NULL || dst_file == NULL) {
fpirntf(stderr, "파일 열기 오류 \n");
return 1;
}
while ((r_count = fread(buffer, 1, sizeof(buffer), src_file)) > 0) {
int w_count = fwrite(buffer, 1, r_count, dst_file);
if (w_count < 0) {
fprintf(stderr, "파일 쓰기 오류\n");
return 1;
}
if (w_count < r_count) {
fprintf(stderr, "미디어 쓰기 오류\n");
return 1;
}
}
printf("copyt.jpg로 이미지 파일 복사 \n");
fclose(src_file);
fclose(dst_file);
return 0;
}