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

ǶÈëʽCÃæÊÔÌâ1

1 . ÓÃÔ¤´¦ÀíÖ¸Áî#define ÉùÃ÷Ò»¸ö³£Êý£¬ÓÃÒÔ±íÃ÷1ÄêÖÐÓжàÉÙÃ루ºöÂÔÈòÄêÎÊÌ⣩
         #define SECONDS_PER_YEAR (60 * 60 * 24 * 365)UL
ÎÒÔÚÕâÏë¿´µ½¼¸¼þÊÂÇ飺
1) #define Óï·¨µÄ»ù±¾ÖªÊ¶£¨ÀýÈ磺²»ÄÜÒԷֺŽáÊø£¬À¨ºÅµÄʹÓ㬵ȵȣ©
2)¶®µÃÔ¤´¦ÀíÆ÷½«ÎªÄã¼ÆËã³£Êý±í´ïʽµÄÖµ£¬Òò´Ë£¬Ö±½Óд³öÄãÊÇÈçºÎ¼ÆËãÒ»ÄêÖÐÓжàÉÙÃë¶ø²»ÊǼÆËã³öʵ¼ÊµÄÖµ£¬ÊǸüÇåÎú¶øûÓдú¼ÛµÄ¡£
3) Òâʶµ½Õâ¸ö±í´ïʽ½«Ê¹Ò»¸ö16λ»úµÄÕûÐÍÊýÒç³ö-Òò´ËÒªÓõ½³¤ÕûÐÍ·ûºÅL,¸æËß±àÒëÆ÷Õâ¸ö³£ÊýÊǵij¤ÕûÐÍÊý¡£
4) Èç¹ûÄãÔÚÄãµÄ±í´ïʽÖÐÓõ½UL£¨±íʾÎÞ·ûºÅ³¤ÕûÐÍ£©£¬ÄÇôÄãÓÐÁËÒ»¸öºÃµÄÆðµã¡£¼Çס£¬µÚÒ»Ó¡ÏóºÜÖØÒª¡£
2 . дһ¸ö"±ê×¼"ºêMIN £¬Õâ¸öºêÊäÈëÁ½¸ö²ÎÊý²¢·µ»Ø½ÏСµÄÒ»¸ö¡£
        #define MIN(A,B) £¨£¨A£© <= (B) ? (A) : (B))
Õâ¸ö²âÊÔÊÇΪÏÂÃæµÄÄ¿µÄ¶øÉèµÄ£º
1) ±êʶ#defineÔÚºêÖÐÓ¦ÓõĻù±¾ÖªÊ¶¡£ÕâÊǺÜÖØÒªµÄ¡£ÒòΪÔÚ  ǶÈë(inline)²Ù×÷·û ±äΪ±ê×¼CµÄÒ»²¿·Ö֮ǰ£¬ºêÊÇ·½±ã²úÉúǶÈë´úÂëµÄΨһ·½·¨£¬¶ÔÓÚǶÈëʽϵͳÀ´Ëµ£¬ÎªÁËÄÜ´ïµ½ÒªÇóµÄÐÔÄÜ£¬Ç¶Èë´úÂë¾­³£ÊDZØÐëµÄ·½·¨¡£
2)ÈýÖØÌõ¼þ²Ù×÷·ûµÄ֪ʶ¡£Õâ¸ö²Ù×÷·û´æÔÚCÓïÑÔÖеÄÔ­ÒòÊÇËüʹµÃ±àÒëÆ÷ÄܲúÉú±Èif-then-else¸üÓÅ»¯µÄ´úÂ룬Á˽âÕâ¸öÓ÷¨ÊǺÜÖØÒªµÄ¡£
3) ¶®µÃÔÚºêÖÐСÐĵذѲÎÊýÓÃÀ¨ºÅÀ¨ÆðÀ´
4) ÎÒÒ²ÓÃÕâ¸öÎÊÌ⿪ʼÌÖÂÛºêµÄ¸±×÷Óã¬ÀýÈ磺µ±ÄãдÏÂÃæµÄ´úÂëʱ»á·¢ÉúʲôÊ£¿
        least = MIN(*p++, b);
3. Ô¤´¦ÀíÆ÷±êʶ#errorµÄÄ¿µÄÊÇʲô£¿
Èç¹ûÄã²»ÖªµÀ´ð°¸£¬Çë¿´²Î¿¼ÎÄÏ×1¡£ÕâÎÊÌâ¶ÔÇø·ÖÒ»¸öÕý³£µÄ»ï¼ÆºÍÒ»¸öÊé´ô×ÓÊǺÜÓÐÓõġ£Ö»ÓÐÊé´ô×ӲŻá¶ÁCÓïÑԿα¾µÄ¸½Â¼È¥ÕÒ³öÏóÕâÖÖÎÊÌâµÄ´ð°¸¡£µ±È»Èç¹ûÄã²»ÊÇÔÚÕÒÒ»¸öÊé´ô×Ó£¬ÄÇôӦÊÔÕß×îºÃÏ£Íû×Ô¼º²»ÒªÖªµÀ´ð°¸¡£
ËÀÑ­»·£¨Infinite loops£©
4. ǶÈëʽϵͳÖо­³£ÒªÓõ½ÎÞÏÞÑ­»·£¬ÄãÔõôÑùÓÃC±àдËÀÑ­»·ÄØ£¿
Õâ¸öÎÊÌâÓü¸¸ö½â¾ö·½°¸¡£ÎÒÊ×Ñ¡µÄ·½°¸ÊÇ£º
while(1)
{
}
һЩ³ÌÐòÔ±¸üϲ»¶ÈçÏ·½°¸£º
for(;;)
{
}
Õâ¸öʵÏÖ·½Ê½ÈÃÎÒΪÄÑ£¬ÒòΪÕâ¸öÓ﷨ûÓÐÈ·Çбí´ïµ½µ×Ôõô»ØÊ¡£Èç¹ûÒ»¸öÓ¦ÊÔÕ߸ø³öÕâ¸ö×÷Ϊ·½°¸£¬ÎÒ½«ÓÃÕâ¸ö×÷Ϊһ¸ö»ú»áȥ̽¾¿ËûÃÇÕâÑù×öµÄ»ù±¾Ô­Àí¡£Èç¹ûËûÃǵĻù±¾´ð°¸ÊÇ£º"ÎÒ±»½Ì×ÅÕâÑù×ö£¬µ«´ÓûÓÐÏëµ½¹ýΪʲô¡£"Õâ»á¸øÎÒÁôÏÂÒ»¸ö»µÓ¡Ïó¡£
µÚÈý¸ö·½°¸ÊÇÓà goto
L


Ïà¹ØÎĵµ£º

C/C++ ±ÊÊÔ¡¢ÃæÊÔÌâÄ¿´ó»ã×Ü


1.ÇóÏÂÃ溯ÊýµÄ·µ»ØÖµ£¨ ΢Èí£©
int func(x)
{
    int countx = 0;
    while(x)
    {
          countx ++;
          x = x&(x-1);
    ......

Îļþ´¦Àíº¯ÊýÈçºÎʹÓã¿Ó÷¨¾ÙÀý£¬CÓëMFC


CÓïÑÔ£¬ÓÐʱºòÕæ²»µÃ²»ÅåËü£¬ÕÕÀí˵£¬Îļþ´¦Àíº¯ÊýÊÇûÓÐʲôºÃ½²µÄ£¬µ«¶ÔÓںܶàCÈëÃŵÄÈËÀ´Ëµ£¬ËƺõÒ²ÊÇÖµµÃ¾²ÐÄƷζһ·¬µÄ¡£
CÖеÄÎļþ´¦Àíº¯Êý²¢²»ºÜ¶à£¬¶ø³£Óõģ¬Ëƺõ¸üÉÙ¡£
º¯Êý²»ÄÑ£¬µ«²¢²»´ú±íÎļþ´¦ÀíÒ²²»ÄÑ¡£ËƺõÓÖÒªÓеãÅÜÌâÁË£¬ÎÒ×ÜÊÇϲ»¶ÅÜÌâ¡£Éϼ¸Ìì×öÃΣ¬Ãε½ÎÒµôµ½ÔÂÇòÉÏÈ¥À²……
¶ÔÎļþµ ......

ÔõÑùÔÚvisual studio.NET ÈÃC,C++,C#´úÂë×Ô¶¯ÅÅÆë

ÎÊÌâÃèÊö£º
C#³ÌÐò,ÀïÃæcopyÁËÐí¶àÔ­À´µÄ´úÂë,ËùÒԲβÆëµÄ,ºÜÄѶÁ,ÈçºÎ²ÅÄÜÈôúÂë×Ô¶¯ÅÅÆë,¾ÍÏóVS   6.0ÖпÉÒÔʹÓÿì½Ý¼ü,·Ç³£·½±ã.
½â´ð£º
ctrl+a,ÏÈÈ«Ñ¡   
ctrl+k,ctrl+f,×Ô¶¯ÅÅÁÐ
»òÕß
ctrl+a,ÏÈÈ«Ñ¡
alt+F8 ×Ô¶¯ÅÅÁÐ ......

½ûÖ¹½øÈëcÅÌ

¿ªÊ¼—ÔËÐЗgpedit.msc£¬´ò¿ª×é²ßÂÔ´°¿Ú—Óû§ÅäÖÃϵē¹ÜÀíÄ£°å”—WINDOWS×é¼þ£¬Ë«»÷´ò¿ªWindows×ÊÔ´¹ÜÀíÆ÷£¬È»ºóË«»÷“·ÀÖ¹´ÓÎҵĵçÄÔ·ÃÎÊÇý¶¯Æ÷”£¬´ò¿ª“ÊôÐÔ”´°¿Ú£¬Ñ¡Ôñ“ÒÑÆôÓÔ£¬È»ºóÑ¡Ôñ“½öÏÞÖÆÇý¶¯Æ÷C”£¨Äã¿ÉÒÔ°ÑÄã²»ÏëÈñðÈË´ò¿ªµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ