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

¡¾C\C++ÓïÑÔÈëÃÅÆª¡¿ λÔËËã

»Ø¹Ë֮ǰµÄƪ·ù£¬CÓïÑÔµÄÖ÷Ì岿·Ö»ù±¾ÒѾ­½éÉÜÍêÁË¡£Ö®ËùÒÔûÓнéÉÜC++µÄÏà¹ØÌØÐÔÊÇÒòΪÔÚ֮ǰµÄÎÄÕÂÖÐCºÍC++ÔÚÕâЩ·½Ãæ¶¼Óй²ÐÔ£¬ËùÒÔÔÚÃæÏò¶ÔÏó֮ǰ¡£ÎÒÃÇÏȰÑÕâЩ¹²ÐÔ¸ø½éÉÜÍê¡£Ò²¾ÍÊÇ˵ÔÚ½éÉÜÃæÏò¶ÔÏó֮ǰ£¬ËùÓеÄÎÄÕ¶¼ÊÇCC++Öж¼ÄÜʹÓõġ£´ÓÕâµãÉÏÀ´¿´£¬ÏÖÔÚÕý¼«Á¦·Ü¶·ÓÚC++Õ½ÏßÉϵijõѧÕß»¹ÊǺÜÓÐÓô¦µÄ¡£
±¾Æª¼ÌÐøÑØ×ÅÕâÌõ·Ïߣ¬µ½±¾ÆªÎªÖ¹°üÀ¨±¾Æª¶¼»¹²»»á¼±ÓÚÈ¥½éÉÜC++µÄÃæÏò¶ÔÏóµÄÌØÐÔ¡£ÄÇôÔÚ֮ǰµÄÎÄÕÂÖУ¬¿ÉÒÔ˵»ù±¾¶¼°ÑÄÚÈݸø½éÉÜÍêÁË¡£±¾ÆªËäÈ»²»ÊÇ´ó¸ÅÄµ«ÊÇÔÚʵ¼ÊµÄÏîÄ¿ÖÐÊǾø¶ÔÀë²»¿ªµÄ¡£ÄÇôÎÒÃǾÍÔÚ±¾Æª¿ªÊ¼ÎÒÃǵÄλÔËËãÂó̡£
Ê×ÏÈ£¬Î»ÔËËãµ½µ×ÓÃÀ´×öʲô£¬Óô¦¶à²»£¬ºÃÏñµ½ÏÖÔÚÎÒҲûÓÐÔõôÓÃλÔËËãÄØ£¿ ºÜ¶à³õѧÕßÎÒÏàÐÅ»áÓÐÕâÑùµÄÒÉÎÊ¡£ÄÇô±¾Æª¾Í½«½éÉÜλÔËËãµÄÇ¿´óÓÃ;¼°ÎÞÏÞ÷ÈÁ¦¡£
λÔËËã¸ú¶þ½øÖÆÁªÏµ·Ç³£½ôÃÜ£¬¶þ½øÖÆÕâ¸ö¸ÅÄîÏàÐÅ´ó¼Ò¶¼²»Ä°Éú£¬ÎÒÃǵÄλÔËËãÒ²¾ÍÊÇÔÚÕâЩ0»ò1ÉϽøÐвÙ×÷¡£²»ÒªËµ¶þ½øÖÆÄã¶¼²»ÖªµÀ¡£±ÈÈ磺
7µÄ8λ¶þ½øÖÆÎª£º 0000 0111
7µÄ32λ¶þ½øÖÆÎª£º 0000 0000 0000 0000 0000 0000 0000 0111
¶þ½øÖÆÓëÊ®½øÖƵĻ»ËãÎҾͲ»ËµÁË¡£ÉÏÃæÎªÊ²Ã´Èý¸ö1¾Í±íʾ7£¬²»ÖªµÀµÄ»°¾Í¿´¿´Êé¹þ¡£
ÉÏÃæËµµ½ÁË8λºÍ32룬ÎÒÃÇÖªµÀÒ»¸ö×Ö½Ú(byte)±íʾ8룬ÄÇô¶þ½øÖƵÄһλ¾ÍÊÇÕâ¸öλµÄÒâ˼¡£intÊÇ32룬ÄÇôдÍêÕûÊý×Ö0µÄ¶þ½øÖƾÍÓÐ32¸ö0¡£ÕâÑù˼¿¼ÆðÀ´ÔÚºóÃæµÄλÔËËãÉÏÒªºÃÀí½âÒ»µã¡£
ÏÈÀ´¿´¿´ÎÒÃǾ­³£Óõ½µÄλÔËËã·û£º& (°´Î»Óë)¡¢| (°´Î»»ò)¡¢^ (°´Î»Òì»ò)¡¢~ (°´Î»È¡·´)¡¢>> (°´Î»ÓÒÒÆ)¡¢<< (°´Î»×óÒÆ)¡£
& ( °´Î»Óë): ¸ÅÄîÉÏÀ´½²¾ÍÊǶþ½øÖÆÉϰ´Ã¿Ò»Î»(0»ò1)½øÐÐÓëÔËËã¡£ ÄÇôÓëÔËËãÊÇʲôÒâ˼¸Ã²»ÓÃÎÒ˵°É£¬¾ÍÊÇÁ½Õß¶¼ÊÇ1½á¹ûÎªÕæ¡£ÆäÖÐÒ»¸öΪ0½á¹ûΪ¼Ù¡£ÕâÀï²»¿ÉÄÜÓÐ0¡¢1Ö®ÍâµÄÊý£¬ÕâÀïÊǶþ½øÖÆ¡£ÏÈ¿´Ò»¸ö8λ¶þ½øÖƵÄÀý×Ó£º
7 & 8  = 0000 0 111 & 0000 1000 = 0000 0000 = 0
7 & 3  = 0000 0111 & 0000 0011 = 0000 0011 = 3
ºÜ¼òµ¥°É¡£²»Óöà˵ÁË£¬¾ÍÊDzÙ×÷0ºÍ1¡£
| ( °´Î»»ò): ¸ÅÄîÉÏÀ´½²¾ÍÊǶþ½øÖÆÉϰ´Ã¿Ò»Î»(0»ò1)½øÐлòÔËËã¡£ ÄÇô»òÔËËãÊÇʲôÒâ˼¸Ã²»ÓÃÎÒ˵°É£¬¾ÍÊÇÁ½Õß¶¼ÊÇ0½á¹ûΪ¼Ù¡£ÆäËüÇé¿ö¶¼ÎªÕæ¡£
7 | 8  = 0000 0 111  | 0000 1000 = 0000 1111 = 15
7 | 3  = 0000 0111  | 0000 0011 = 0000 0111 = 7
^( °´Î»Òì»ò): ¸ÅÄîÉÏÀ´½²¾ÍÊǶþ½øÖÆÉϰ´Ã¿Ò»Î»(0»ò1)½øÐÐÒì»òÔËËã¡£ Òì»òÔËËã¼òµ¥½²¾


Ïà¹ØÎĵµ£º

ÖªÃûC/C++±àÒëÆ÷´ó±ÈÆ´£¡

ÏÈ·¢±íÒ»ÏÂÓÞ¼û£¬»¶Ó­´ó»ï¶ùÅÄש£º
Visual C++£ºWindowsƽ̨ÉÏ×îÁ÷ÐеıàÒëÆ÷£¬ºÍVS¼¯³ÉµÄºÜºÃ£¬±àÒëЧÂʺͱàÒëºóµÄ´úÂëЧÂʶ¼²»´í£¬µ«ÊÇ£¬³ýÁ˱ȽϺÃÓÃÖ®Í⣬ºÃÏóûÓÐÌØ±ðÍ»³öµÄ...¶øÇÒ£¬Ö§³ÖµÄÓ²¼þƽ̨ºÃÏóÖ»ÓÐX86µÄ...
GCC/G++£º¿ªÔ´µÄ£¬Linux/Unixƽ̨ÉϵÄÊ×Ñ¡£¬¶øÇÒÖ§³ÖNÖÐÓ²¼þƽ̨£¬Èç¹ûÏë½øÐÐ¿çÆ½Ì¨±àÒëµÄ»°£¬Õâ ......

´ÓC++¸Éµ½×ªÐÍΪjavaÊÇÍ˲½£¬ÕýÈ·Óë·ñ£¿

½ñÌìÔÚ¹äÂÛ̳µÄʱºò¿´µ½ÓÐÈ˽ò½òÀÖµÀ£º´ÓC++¸Éµ½×ªÐÍΪjavaÊÇÍ˲½
ÎÒ²»ÈÏΪÊÇÕâÑù£¬Ê×ÏÈÓ¦¸ÃÒ»¸öÈ˵ÄÐËȤ£¬¼ÓÉÏÕâÃÅÓïÑÔ£¬ÕâÃŹ¤×÷ÊÇ·ñ·ûºÏÄã
¸É×Ô¼ºÏ²»¶µÄÓïÑÔ±àÂë²ÅÊÇ×îÖØÒªµÄ£¬µ±È»java±È½ÏÈÝÒ׵㣬ÎÒÒ²ÊÇÕâÑùÈÏΪµÄ
µ«ÊÇjava²¢²»ÊÇ´ó¼ÒËù˵µÄÄÇôÈÝÒ×£¬µ±½ñÉç»áË­²»¸Ò˵×Ô¼º»ássh£¬µ±ÊÇ×Ô¼ºÎÊÐÄ×Ô¼ºÑ§µÃÓжàºÃ£¬
ÔÚ ......

ÏÔʾµ¥ÔµÄÈÕÀúµÄC³ÌÐò

ÌâÄ¿ÈçÏ£º
ÒªÇóÏÔʾ³öµ¥ÔµÄÈÕÀú£¬Óû§ËµÃ÷Õâ¸öÔµÄÌìÊýºÍ±¾ÔÂµÄÆðʼÈÕÊÇÐÇÆÚ¼¸£¬¼´¿ÉÊä³ö¸ÃÔµÄÈÕÀú¡£
¾ÍÊÇÕâôһµÀ¼òµ¥µÄ³ÌÐò£¬ÎÒ±ïÁËÁ½Ìì×ÜËãŪ³öÀ´ÁË£¬½á¹ûËäÈ»´ïµ½ÁËÒªÇ󣬵«¾àÀëÎÒÔ¤ÏëµÄ»¹ÓÐÒ»¶Î²î¾à£¬ÏȰѳÌÐò
´úÂë·ÅÔÚÉÏÃæ£¬Ï£Íû´ó¼Ò¶àÌáÐÞ¸ÄÒâ¼û¡£
/******************************************************* ......

¡¾C/C++¡¿C++ÐéÎö¹¹º¯ÊýµÄ×÷ÓÃ

1¡¢×÷ÓÃ
ΪÁËÔÚʵÏÖ¶à̬µÄʱºò²»Ôì³ÉÄÚ´æÐ¹Â¶,
Èç¹û»ùÀàÎö¹¹º¯Êýǰ²»¼Óvitual£¬ÅÉÉúÀà¶ÔÏó±»Ïú»Ùºó£¬Ö»»áµ÷ÓûùÀàµÄÎö¹¹º¯Êý£¬¶ø²»»áÈ¥µ÷ÓÃÅÉÉúÀàµÄÎö¹¹º¯Êý¡£
2¡¢¶ÔÓÚÕý³£µÄº¯Êý£¬Èç¹û»ùÀàÖÐÉùÃ÷Ϊvirtual£¬ÔòÅÉÉúÀà¿ÉÒÔ²»ÓÃÔÙдvirtual
// CPPTest.cpp : Defines the entry point for the console application.
// ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ