buf data is written to the file

 FILE *stream;
    if ((stream = fopen("/root/aaa.pdf", "wb")) == NULL) /* open file TEST.$$$ */
        {
            fprintf(stderr, "Cannot open output file.\n");
            return 1;
        }

        fwrite (dest_buf, dest_size, 1 , Stream); / * write struct file * / 
        fclose (Stream); / * close file * /

 

Guess you like

Origin www.cnblogs.com/hshy/p/12190628.html