#include <stdio.h>
#include <math.h>
#include <string.h>
int main(void){
FILE * src=fopen("simple.txt", "rt");
FILE * des=fopen("deds.txt", "wt");
char str[20];
if(src==NULL || des == NULL)
{
puts("파일오픈 실패!");
return -1;
}
while(fgets(str, sizeof(str),src)!=NULL)
fputs(str, des);
if(feof(src)!=0)
puts("파일복사 완료!");
else
puts("파일복사 실패!");
fclose(src);
fclose(des);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: