Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

Dengjin_CN

@Dengjin_CN
About
Posts
5
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • question about copy a picture with c [modified]
    D Dengjin_CN

    thanks for your reply. "it fails" means the file was created but was empty.I realized that the file d:\\a.jpg doesn't exist there before the program runs,now i created it then execute the program,it successed. however,i can't understand my book says "a" will create a file when the file doesn't exist,campare with "w",:confused:why it produces different result?

    C / C++ / MFC question help

  • question about copy a picture with c [modified]
    D Dengjin_CN

    I wrote the code below to copy a picture,and why it will fail if i change the mode of fdest to "ab"? "ab" means write and add to file,isn't it?what's the difference?

    #include<stdlib.h>
    #include<stdio.h>

    #define MAX 1024
    int
    main(int argc,int **argv){

    FILE \*fsource,\*fdest;
    size\_t in;
    int buf\[MAX\];
    fsource = fopen("F:\\\\a.jpg.rar","rb");
    fdest = fopen("D:\\\\a.jpg","wb");
    if(fsource == NULL || fdest == NULL)
    	perror("open error");
    
    while((in = fread(buf,sizeof(int),MAX,fsource)) != 0){
    	fwrite(buf,sizeof(int),in,fdest);
    	fflush(fdest);
    }
    
    fclose(fsource);
    fclose(fdest);
    
    return EXIT\_SUCCESS;
    

    }

    modified on Saturday, October 17, 2009 5:49 AM

    C / C++ / MFC question help

  • How write in perl ?
    D Dengjin_CN

    It can't be discribed in a word,maybe the book named Learning Perl will help you ;)

    Linux, Apache, MySQL, PHP perl tutorial question

  • I want to know some c libraries
    D Dengjin_CN

    well,everybody,I said C~~maybe you should tell me something likes GTK library,any others?I know GTK only... ;P ;P

    C / C++ / MFC c++ question

  • I want to know some c libraries
    D Dengjin_CN

    I'm a rookie to C and i'm looking for some libraries to learn,something likes the C++ STL or Boost ,does any1 can tell me some of them?Thanks a lot Eric

    C / C++ / MFC c++ question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups