![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Sep 2005
Posts: 50
Rep Power: 0
![]() |
bug that i can't find
this works fine but it has a problem that it writes an extra char "ÿ" in end of the copied file then exits.
#include<conio.h> #include<stdio.h> #include<stdlib.h> using namespace std; int main() { int a,b; char ch; FILE *fp,*cfp; //cheak file exists if((fp=(fopen("sunny.txt","r")))==NULL) { printf("Were the fuck is file"); } //cheak that file has created if((cfp=fopen("sunny.out","w"))==NULL) { printf("window sucks"); } while(feof(fp)==0) { ch=fgetc(fp); fputc(ch,cfp); printf("%c",ch); } fclose(fp); fclose(cfp); } |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|