ºìÁªLinuxÃÅ»§
Linux°ïÖú

ÔÚlinuxϵÄc/c++ʵÏÖ±à³Ì

·¢²¼Ê±¼ä:2006-04-06 17:09:16À´Ô´:ºìÁª×÷Õß:±ù¡á¡î¡ásnow
1¡¢±àдһ¶ÎcÓïÑÔ³ÌÐòʹÆäÍê³É£º
¶ÔÓû§ÊäÈëµÄÎļþÃûµÄÄÚÈݽøÐп½±´¡£
¡¡¡¡ÀýÈ磺¡°%EXE aFile bFile¡ý(»Ø³µ)¡±½«ÎļþafileµÄÄÚÈÝ¿½±´µ½ÎļþbflieÖС£
2¡¢±àдһ¶ÎcÓïÑÔ³ÌÐòʹÆäÍê³É£º
¡¡¡¡´´½¨Ò»¸öÐÂÎļþ£¬ÊäÈëÒ»¶ÎÊý¾Ý£¬È»ºóËæ»úÒƶ¯Ö¸Õ룬½Ó×ŲåÈëÒ»¶ÎÊý¾Ý¡£Íê³Éºó£¬²é¿´¸ÃÎļþµÄ´óСºÍ¡¡¡¡ÄÚÈÝ¡£

:handshake:handshake:handshake
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 7 ÌõÆÀÂÛ

  1. rainbownl ÓÚ 2010-06-10 17:49:57·¢±í:

    [i=s] ±¾Ìû×îºóÓÉ rainbownl ÓÚ 2010-6-10 17:52 ±à¼­ [/i]

    #include
    #include
    #include
    #include
    #include

    int main(int argc,char **argv){
    int fda,fdb;
    char *buf;
    struct stat filestat;
    int filelength;

    fda = open(argv[1],O_RDWR);
    fdb = open(argv[2],O_RDWR);
    fstat(fda,&filestat);
    filelength = filestat.st_size;
    buf = malloc(filelength);
    read(fda,buf,filelength);
    write(fdb,buf,filelength);
    close(fda);
    close(fdb);
    return 0;
    }
    ¼òÂÔдµÄ£¬Ã»¼Ó´íÎó´¦Àí²¿·Ö£¬µ±Ç°Ä¿Â¼ÐèÒªÊÂÏÈÓÐÁ½¸öÎļþ
    µÚ¶þ¸öÎÊÌâû¸ãÃ÷°×Ëæ»úÒƶ¯Ö¸ÕëÊÇÔõô¸ö¸ã·¨£¬£¬

  2. hacekr4419 ÓÚ 2010-06-08 10:23:47·¢±í:

    ºÇºÇ´ó²¿·Ö¶¼¿´²»¶®...

  3. ubuntuchao ÓÚ 2010-06-07 14:02:27·¢±í:

    ÐÂÊÖ £¬Ã»Óп´¶®£¬ ¡«

  4. xinganlanlv ÓÚ 2010-06-06 16:16:09·¢±í:

    ͬ¥ÉÏ£¡£¡£¡£¡£¡

  5. hmm_sd ÓÚ 2010-06-06 09:42:23·¢±í:

    ʲô¶«Î÷

  6. Ì«ÑôÖ®¹â ÓÚ 2010-05-10 12:05:17·¢±í:

    Ì«¼òÂÔÁË1???û¿´¶®????

  7. caoyu1199 ÓÚ 2010-04-24 13:20:54·¢±í:

    ¿´²»¶®