file1.c
{
FILE *p;
int s;
// code for reading value of s---------
p=fopen("file2.c",a+); // file2.c created with append mode
switch(s)
{
case 1:
printf("function f1 called");
//below is showing an error... i knw its not the proper way
fwrite(p,"func1()"); // "here i want to copy function func1 to another file...on selecting case1"
//other cases etc
}
fclose(p);
getch();
}
func1()
{
//body
}
I want to copy the whole function func1() to another file file2.c by using file handling.........or an other way......
plz helpppppppppppppppppppppppppppppppppppppppppp

New Topic/Question
Reply



MultiQuote












|