B
Bill Cunningham
My compiler gives me a syntax error on line 13 and I don't see. Here's
the code.
#include <stdio.h>
int chunk (char *n1, char *n2, int bs, int nb);
main(){
int chunk (char *n1, char *n2, int bs, int nb)
{FILE *fp;
fp=fopen(n1,"rb");
fread(n1,bs,sizeof(nb),fp);
fclose(fp);
fp=fopen(n2,"wb");
fwrite(n2,bs,sizeof(nb),fp);
fclose(fp);}
I would think this fuction should be declared on a header and compile into
an object file and maybe even a lib file and linked to something using main.
But this still should work shouldn't it?
Bill
the code.
#include <stdio.h>
int chunk (char *n1, char *n2, int bs, int nb);
main(){
int chunk (char *n1, char *n2, int bs, int nb)
{FILE *fp;
fp=fopen(n1,"rb");
fread(n1,bs,sizeof(nb),fp);
fclose(fp);
fp=fopen(n2,"wb");
fwrite(n2,bs,sizeof(nb),fp);
fclose(fp);}
I would think this fuction should be declared on a header and compile into
an object file and maybe even a lib file and linked to something using main.
But this still should work shouldn't it?
Bill