c++µÄ¹Ø¼ü×ֵĺ¬Òå-µÚ1²¿·Ö
°´¼üÅÌÉÏ·½Ïò¼ü ¡û »ò ¡ú ¿É¿ìËÙÉÏÏ·ҳ£¬°´¼üÅÌÉ쵀 Enter ¼ü¿É»Øµ½±¾ÊéĿ¼ҳ£¬°´¼üÅÌÉÏ·½Ïò¼ü ¡ü ¿É»Øµ½±¾Ò³¶¥²¿£¡
¡ª¡ª¡ª¡ªÎ´ÔĶÁÍꣿ¼ÓÈëÊéÇ©ÒѱãÏ´μÌÐøÔĶÁ£¡
2¡£¡¡auto£¨×Ô¶¯£¬automatic£©ÊÇ´æ´¢ÀàÐͱêʶ·û£¬±íÃ÷±äÁ¿¡°×Ô¶¯¡±¾ßÓб¾µØ·¶Î§£¬¿é·¶Î§µÄ±äÁ¿ÉùÃ÷£¨ÈçforÑ»·ÌåÄڵıäÁ¿ÉùÃ÷£©Ä¬ÈÏΪauto´æ´¢ÀàÐÍ¡£
3¡£¡¡bool£¨²¼¶û£©ÀàÐÍ£¬C£«£«ÖеĻù±¾Êý¾Ý½á¹¹£¬ÆäÖµ¿ÉѡΪtrue£¨Õ棩»òÕßfalse£¨¼Ù£©¡£C£«£«ÖеÄboolÀàÐÍ¿ÉÒÔºÍint»ìÓ㬾ßÌåÀ´Ëµ¾ÍÊÇ0´ú±ífalse£¬·Ç0´ú±ítrue¡£boolÀàÐͳ£ÓÃÓÚÌõ¼þÅжϺͺ¯Êý·µ»ØÖµ¡£
4¡£¡¡break£¨Öжϡ¢Ìø³ö£©£¬ÓÃÔÚswitchÓï¾ä»òÕßÑ»·Óï¾äÖС£³ÌÐòÓöµ½breakºó£¬¼´Ìø¹ý¸Ã³ÌÐò¶Î£¬¼ÌÐøºóÃæµÄÓï¾äÖ´ÐС£
5¡£¡¡¡¡¡¡¡¡¡¡caseÓÃÓÚswitchÓï¾äÖУ¬ÓÃÓÚÅжϲ»Í¬µÄÌõ¼þÀàÐÍ¡£
6¡£¡¡¡¡¡¡¡¡¡¡catch
catchºÍtryÓï¾äÒ»ÆðÓÃÓÚÒì³£´¦Àí¡£
7¡£¡¡¡¡¡¡¡¡¡¡char
char£¨×Ö·û£¬character£©ÀàÐÍ£¬C£«£«ÖеĻù±¾Êý¾Ý½á¹¹£¬ÆäÖµÒ»°ãΪ0~255µÄint¡£Õâ256¸ö×Ö·û¶ÔÓ¦×Å256¸öASCIIÂë¡£charÀàÐ͵ÄÊý¾ÝÐèÒªÓõ¥ÒýºÅ¡¯¡¯À¨ÆðÀ´¡£
8¡£¡¡¡¡¡¡¡¡¡¡class
class£¨ÀࣩÊÇC£«£«ÃæÏò¶ÔÏóÉè¼ÆµÄ»ù´¡¡£Ê¹ÓÃclass¹Ø¼ü×ÖÉùÃ÷Ò»¸öÀà¡£
9¡£¡¡¡¡¡¡¡¡¡¡const
const£¨³£Á¿µÄ£¬constant£©ËùÐÞÊεĶÔÏó»ò±äÁ¿²»Äܱ»¸Ä±ä£¬ÐÞÊκ¯Êýʱ£¬¸Ãº¯Êý²»ÄܸıäÔڸú¯ÊýÍâÃæÉùÃ÷µÄ±äÁ¿Ò²²»Äܵ÷ÓÃÈκηÇconstº¯Êý¡£ÔÚº¯ÊýµÄÉùÃ÷Ó붨Òåʱ¶¼Òª¼ÓÉÏconst£¬·ÅÔÚº¯Êý²ÎÊýÁбíµÄ×îºóÒ»¸öÀ¨ºÅºó¡£ÔÚC£«£«ÖУ¬ÓÃconstÉùÃ÷Ò»¸ö±äÁ¿£¬ÒâζןñäÁ¿¾ÍÊÇÒ»¸ö´øÀàÐ͵ij£Á¿£¬¿ÉÒÔ´úÌæ#define£¬ÇÒ±È#define¶àÒ»¸öÀàÐÍÐÅÏ¢£¬ÇÒËüÖ´ÐÐÄÚÁ´½Ó£¬¿É·ÅÔÚÍ·ÎļþÖÐÉùÃ÷£»µ«ÔÚCÖУ¬ÆäÉùÃ÷Ôò±ØÐë·ÅÔÚÔ´Îļþ£¨¼´¡£CÎļþ£©ÖУ¬ÔÚCÖÐconstÉùÃ÷Ò»¸ö±äÁ¿£¬³ýÁ˲»ÄܸıäÆäÖµÍ⣬ËüÈÔÊÇÒ»¾ß±äÁ¿
10¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡const_cast
Ó÷¨£ºconst_cast¡¡£¨expression£©
¸ÃÔËËã·ûÓÃÀ´ÐÞ¸ÄÀàÐ͵Äconst»òvolatileÊôÐÔ¡£³ýÁËconst¡¡»òvolatileÐÞÊÎÖ®Í⣬¡¡type_idºÍexpressionµÄÀàÐÍÊÇÒ»ÑùµÄ¡£³£Á¿Ö¸Õ뱻ת»¯³É·Ç³£Á¿Ö¸Õ룬²¢ÇÒÈÔȻָÏòÔÀ´µÄ¶ÔÏó£»³£Á¿ÒýÓñ»×ª»»³É·Ç³£Á¿ÒýÓ㬲¢ÇÒÈÔȻָÏòÔÀ´µÄ¶ÔÏó£»³£Á¿¶ÔÏó±»×ª»»³É·Ç³£Á¿¶ÔÏó¡£
11¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡continue
continue£¨¼ÌÐø£©¹Ø¼ü×ÖÓÃÓÚÑ»·½á¹¹¡£Ëüʹ³ÌÐòÌø¹ý´úÂë¶Îºó²¿µÄ²¿·Ö£¬Óëbreak²»Í¬µÄÊÇ£¬continue²»ÊǽøÈë´úÂë¶ÎºóµÄ²¿·ÖÖ´ÐУ¬¶øÊÇÖØпªÊ¼ÐµÄÑ»·¡£Òò¶øËüÊÇ¡°¼ÌÐøÑ»·¡±Ö®Ò⣬²»ÊÇbreak£¨Ìø³ö£©¡£
12¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡default
default£¨Ä¬ÈÏ¡¢È±Ê¡£©ÓÃÓÚswitchÓï¾ä¡£µ±switchËùÓеÄcase¶¼²»Âú×ãʱ£¬½«½øÈëdefaultÖ´ÐС£defaultÖ»ÄÜ·ÅÔÚswitchÓï¾äËùÓеÄcaseÖ®ºó£¬²¢ÇÒÊÇ¿ÉÑ¡µÄ¡£
13¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡delete
delete£¨É¾³ý£©ÊͷųÌÐò¶¯Ì¬ÉêÇëµÄÄÚ´æ¿Õ¼ä¡£deleteºóÃæͨ³£ÊÇÒ»¸öÖ¸Õë»òÕßÊý×飧£§£¬²¢ÇÒÖ»ÄÜdeleteͨ¹ýnew¹Ø¼ü×ÖÉêÇëµÄÖ¸Õ룬·ñÔò»á·¢Éú¶Î´íÎó¡£
14¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡do
do¡whileÊÇÒ»ÀàÑ»·½á¹¹¡£ÓëwhileÑ»·²»Í¬£¬do¡whileÑ»·±£Ö¤ÖÁÉÙÒª½øÈëÑ»·ÌåÒ»´Î¡£
15¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡double
double£¨Ë«¾«¶È£©ÀàÐÍ£¬C£«£«ÖеĻù±¾Êý¾Ý½á¹¹£¬ÒÔË«¾«¶ÈÐÎʽ´æ´¢Ò»¸ö¸¡µãÊý¡£
16¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡dynamic_cast
dynamic_cast£¨¶¯Ì¬×ª»»£©£¬ÔÊÐíÔÚÔËÐÐʱ¿Ì½øÐÐÀàÐÍת»»£¬´Ó¶øʹ³ÌÐòÄܹ»ÔÚÒ»¸öÀà²ã´Î½á¹¹°²È«µØת»»ÀàÐÍ¡£dynamic_castÌṩÁËÁ½ÖÖת»»·½Ê½£¬°Ñ»ùÀàÖ¸Õëת»»³ÉÅÉÉúÀàÖ¸Õ룬»òÕß°ÑÖ¸Ïò»ùÀàµÄ×óֵת»»³ÉÅÉÉúÀàµÄÒýÓá£
17¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡else
else½ô¸úÔÚifºóÃ棬ÓÃÓÚ¶Ôif²»³ÉÁ¢µÄÇé¿öµÄÑ¡Ôñ¡£
18¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡enum
enum£¨Ã¶¾Ù£©ÀàÐÍ£¬¸ø³öһϵÁй̶¨µÄÖµ£¬Ö»ÄÜÔÚÕâÀïÃæ½øÐÐÑ¡ÔñÒ»¸ö¡£
19¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡explicit
explicit£¨ÏÔʽµÄ£©µÄ×÷ÓÃÊÇ¡°½ûÖ¹µ¥²ÎÊý¹¹Ô캯Êý¡±±»ÓÃÓÚ×Ô¶¯Ðͱðת»»£¬ÆäÖбȽϵäÐ͵ÄÀý×Ó¾ÍÊÇÈÝÆ÷ÀàÐÍ¡£ÔÚÕâÖÖÀàÐ͵Ĺ¹Ô캯ÊýÖÐÄã¿ÉÒÔ½«³õʼ³¤¶È×÷Ϊ²ÎÊý´«µÝ¸ø¹¹Ô캯Êý¡£
20¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡export
ΪÁË·ÃÎÊÆäËû±àÒëµ¥Ôª£¨ÈçÁíÒ»´úÂëÎļþ£©ÖеıäÁ¿»ò¶ÔÏ󣬶ÔÆÕͨÀàÐÍ£¨°üÀ¨»ù±¾Êý¾ÝÀà¡¢½á¹¹ºÍÀࣩ£¬¿ÉÒÔÀûÓùؼü×Öextern£¬À´Ê¹ÓÃÕâЩ±äÁ¿»ò¶ÔÏóʱ£»µ«ÊǶÔÄ£°åÀàÐÍ£¬Ôò±ØÐëÔÚ¶¨ÒåÕâЩģ°åÀà¶ÔÏóºÍÄ£°åº¯Êýʱ£¬Ê¹Óñê×¼C£«£«ÐÂÔö¼ÓµÄ¹Ø¼ü×Öexport£¨µ¼³ö£©¡£
21¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡extern
extern£¨ÍⲿµÄ£©ÉùÃ÷±äÁ¿»òº¯ÊýΪÍⲿÁ´½Ó£¬¼´¸Ã±äÁ¿»òº¯ÊýÃûÔÚÆäËüÎļþÖпɼû¡£±»ÆäÐÞÊεıäÁ¿£¨Íⲿ±äÁ¿£©ÊǾ²Ì¬·ÖÅä¿Õ¼äµÄ£¬¼´³ÌÐò¿ªÊ¼Ê±·ÖÅ䣬½áÊøʱÊÍ·Å¡£ÓÃÆäÉùÃ÷µÄ±äÁ¿»òº¯ÊýÓ¦¸ÃÔÚ±ðµÄÎļþ»òͬһÎļþµÄÆäËüµØ·½¶¨Ò壨ʵÏÖ£©¡£ÔÚÎļþÄÚÉùÃ÷Ò»¸ö±äÁ¿»òº¯ÊýĬÈÏΪ¿É±»ÍⲿʹÓá£ÔÚC£«£«ÖУ¬»¹¿ÉÓÃÀ´Ö¸¶¨Ê¹ÓÃÁíÒ»ÓïÑÔ½øÐÐÁ´½Ó£¬ÕâʱÐèÒªÓëÌض¨µÄת»»·ûÒ»ÆðʹÓá£Ä¿Ç°½öÖ§³Ö¡±C¡±×ª»»±ê¼Ç£¬À´Ö§³ÖC±àÒëÆ÷Á´½Ó¡£Ê¹ÓÃÕâÖÖÇé¿öÓÐÁ½ÖÖÐÎʽ£º
extern¡¡¡°C¡±¡¡ÉùÃ÷Óï¾ä
extern¡¡¡°C¡±¡¡£û¡¡ÉùÃ÷Óï¾ä¿é¡¡£ý
22¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡false
false£¨¼ÙµÄ£©£¬C£«£«µÄ»ù±¾Êý¾Ý½á¹¹boolÀàÐ͵ÄÖµÖ®Ò»¡£µÈͬÓÚintµÄ0Öµ¡£
23¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡float
float£¨¸¡µãÊý£©£¬C£«£«ÖеĻù±¾Êý¾Ý½á¹¹£¬¾«¶ÈСÓÚdouble¡£
24¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡for
forÊÇC£«£«ÖеÄÑ»·½á¹¹Ö®Ò»£¬ÓÃÓÚÓÐÈ·¶¨¿ªÊ¼ºÍ½áÊøÒÔ¼°ÐèҪȷ¶¨²½³¤µÄÑ»·½á¹¹¡£
25¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡friend
friend£¨ÓÑÔª£©ÉùÃ÷ÓÑÔª¹Øϵ¡£ÓÑÔª¿ÉÒÔ·ÃÎÊÓëÆäÓÐfriend¹ØϵµÄÀàÖеÄprivate/protected³ÉÔ±£¬Í¨¹ýÓÑÔªÖ±½Ó·ÃÎÊÀàÖеÄ
private/protected³ÉÔ±µÄÖ÷ҪĿµÄÊÇÌá¸ßЧÂÊ¡£ÓÑÔª°üÀ¨ÓÑÔªº¯ÊýºÍÓÑÔªÀà¡£¡¡
26¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡goto
goto£¨×ªµ½£©£¬ÓÃÓÚÎÞÌõ¼þÌøתµ½Ä³Ò»±êºÅ´¦¿ªÊ¼Ö´ÐС£
27¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡if
if£¨Èç¹û£©£¬C£«£«ÖеÄÌõ¼þÓï¾äÖ®Ò»£¬¿ÉÒÔ¸ù¾ÝºóÃæµÄboolÀàÐ͵ÄֵѡÔñ½øÈëÒ»¸ö·ÖÖ§Ö´ÐС£
28¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡inline
inline£¨ÄÚÁª£©º¯ÊýµÄ¶¨Ò彫ÔÚ±àÒëʱÔÚµ÷Óô¦Õ¹¿ª¡£inlineº¯ÊýÒ»°ãÓɶÌСµÄÓï¾ä×é³É£¬¿ÉÒÔÌá¸ß³ÌÐòЧÂÊ¡£
29¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡int
int£¨ÕûÐÍ£¬integer£©£¬C£«£«ÖеĻù±¾Êý¾Ý½á¹¹£¬ÓÃÓÚ±íʾÕûÊý£¬¾«¶ÈСÓÚlong¡£
30¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡long
long£¨³¤ÕûÐÍ£¬long¡¡integer£©£¬C£«£«ÖеĻù±¾Êý¾Ý½á¹¹£¬ÓÃÓÚ±íʾ³¤ÕûÊý¡£
31¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡mutable
mutable£¨Ò×±äµÄ£©ÊÇC£«£«ÖÐÒ»¸ö²»³£ÓõĹؼü×Ö¡£Ö»ÄÜÓÃÓÚÀàµÄ·Ç¾²Ì¬ºÍ·Ç³£Á¿Êý¾Ý³ÉÔ±¡£ÓÉÓÚÒ»¸ö¶ÔÏóµÄ״̬ÓɸöÔÏóµÄ·Ç¾²Ì¬Êý¾Ý³ÉÔ±¾ö¶¨£¬ËùÒÔËæ×ÅÊý¾Ý³ÉÔ±µÄ¸Ä±ä£¬¶ÔÏñµÄ״̬Ҳ»áËæÖ®·¢Éú±ä»¯¡£Èç¹ûÒ»¸öÀàµÄ³ÉÔ±º¯Êý±»ÉùÃ÷ΪconstÀàÐÍ£¬±íʾ¸Ãº¯Êý²»»á¸Ä±ä¶ÔÏóµÄ״̬£¬Ò²¾ÍÊǸú¯Êý²»»áÐÞ¸ÄÀàµÄ·Ç¾²Ì¬Êý¾Ý³ÉÔ±¡£µ«ÊÇÓÐЩʱºòÐèÒªÔÚ¸ÃÀຯÊýÖжÔÀàµÄÊý¾Ý³ÉÔ±½øÐи³Öµ£¬Õâ¸öʱºò¾ÍÐèÒªÓõ½mutable¹Ø¼ü×Ö¡£
32¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡namespace
namespace£¨ÃüÃû¿Õ¼ä£©ÓÃÓÚÔÚÂß¼ÉÏ×éÖ¯À࣬ÊÇÒ»ÖÖ±ÈÀà´óµÄ½á¹¹¡£
33¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡new
new£¨Ð½¨£©ÓÃÓÚн¨Ò»¸ö¶ÔÏó¡£newÔËËã·û×ÜÊÇ·µ»ØÒ»¸öÖ¸Õë¡£ÓÉnew´´½¨µÄ¶ÔÏóÐèÒªÔÚÇ¡µ±µÄµØ·½½øÐÐdelete²Ù×÷¡£
34¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡operator
operator£¨²Ù×÷·û£©ÓÃÓÚ²Ù×÷·ûÖØÔØ¡£ÕâÊÇC£«£«ÖеÄÒ»ÖÖÌØÊâµÄº¯Êý¡£
35¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡private
private£¨Ë½Óеģ©£¬C£«£«ÖеķÃÎÊ¿ØÖÆ·û¡£±»±êÃ÷ΪprivateµÄ×Ö¶ÎÖ»ÄÜÔÚ±¾ÀàÒÔ¼°ÓÑÔªÖзÃÎÊ¡£
36¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡protected
protected£¨Êܱ£»¤µÄ£©£¬C£«£«ÖеķÃÎÊ¿ØÖÆ·û¡£±»±êÃ÷ΪprotectedµÄ×Ö¶ÎÖ»ÄÜÔÚ±¾ÀàÒÔ¼°Æä¼Ì³ÐÀàºÍÓÑÔªÖзÃÎÊ¡£
37¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡public
public£¨¹«Óеģ©£¬C£«£«ÖеķÃÎÊ¿ØÖÆ·û¡£±»±êÃ÷ΪpublicµÄ×ֶοÉÒÔÔÚÈκÎÀàÖнøÐзÃÎÊ¡£
38¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡register
register£¨¼Ä´æÆ÷£©ÉùÃ÷µÄ±äÁ¿³Æ׿ĴæÆ÷±äÁ¿£¬ÔÚ¿ÉÄܵÄÇé¿öÏ»áÖ±½Ó´æ·ÅÔÚ»úÆ÷µÄ¼Ä´æÆ÷ÖУ»µ«¶Ô32λ±àÒëÆ÷²»Æð×÷Ó㬵±global¡¡optimizations£¨È«¾ÖÓÅ»¯£©¿ªµÄʱºò£¬Ëü»á×ö³öÑ¡ÔñÊÇ·ñ·ÅÔÚ×Ô¼ºµÄ¼Ä´æÆ÷ÖУ»²»¹ýÆäËüÓëregister¹Ø¼ü×ÖÓйصÄÆäËü·ûºÅ¶¼¶Ô32λ±àÒëÆ÷ÓÐЧ¡£
39¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡reinterpret_cast
Ó÷¨£ºreinpreter_cast¡¡£¨expression£©
type¡id±ØÐëÊÇÒ»¸öÖ¸Õë¡¢ÒýÓá¢ËãÊõÀàÐÍ¡¢º¯ÊýÖ¸Õë»òÕß³ÉÔ±Ö¸Õë¡£Ëü¿ÉÒÔ°ÑÒ»¸öÖ¸Õëת»»³ÉÒ»¸öÕûÊý£¬Ò²¿ÉÒÔ°ÑÒ»¸öÕûÊýת»»³ÉÒ»¸öÖ¸Õ루ÏÈ°ÑÒ»¸öÖ¸Õëת»»³ÉÒ»¸öÕûÊý£¬ÔڰѸÃÕûÊýת»»³ÉÔÀàÐ͵ÄÖ¸Õ룬»¹¿ÉÒԵõ½ÔÏȵÄÖ¸ÕëÖµ£©¡£
40¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡return
return£¨·µ»Ø£©ÓÃÓÚÔÚº¯ÊýÖзµ»ØÖµ¡£³ÌÐòÔÚÖ´Ðе½returnÓï¾äºóÁ¢¼´·µ»Ø£¬returnºóÃæµÄÓï¾äÎÞ·¨Ö´Ðе½¡£
41¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡short
short£¨¶ÌÕûÐÍ£¬short¡¡integer£©£¬C£«£«ÖеĻù±¾Êý¾Ý½á¹¹£¬ÓÃÓÚ±íʾÕûÊý£¬¾«¶ÈСÓÚint¡£
42¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡signed
signed£¨ÓзûºÅ£©£¬±íÃ÷¸ÃÀàÐÍÊÇÓзûºÅÊý£¬ºÍunsignedÏà·´¡£Êý×ÖÀàÐÍ£¨ÕûÐͺ͸¡µãÐÍ£©¶¼¿ÉÒÔÓÃsignedÐÞÊΡ£µ«Ä¬ÈϾÍÊÇsigned£¬ËùÒÔÒ»
°ã²»»áÏÔʽʹÓá£
43¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡sizeof
ÓÉÓÚC£«£«Ã¿ÖÖÀàÐ͵ĴóС¶¼ÊÇÓɱàÒëÆ÷×ÔÐоö¶¨µÄ£¬ÎªÁËÔö¼Ó¿ÉÒÆÖ²ÐÔ£¬¿ÉÒÔÓÃsizeofÔËËã·û»ñµÃ¸ÃÊý¾ÝÀàÐÍÕ¼ÓõÄ×Ö½ÚÊý¡£
44¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡static
static£¨¾²Ì¬µÄ£©¾²Ì¬±äÁ¿×÷Ó÷¶Î§ÔÚÒ»¸öÎļþÄÚ£¬³ÌÐò¿ªÊ¼Ê±·ÖÅä¿Õ¼ä£¬½áÊøʱÊͷſռ䣬ĬÈϳõʼ»¯Îª0£¬Ê¹ÓÃʱ¿É¸Ä±äÆäÖµ¡£¾²Ì¬±äÁ¿»ò
¾²Ì¬º¯Êý£¬Ö»Óб¾ÎļþÄڵĴúÂë²Å¿É·ÃÎÊËü£¬ËüµÄÃû×Ö£¨±äÁ¿Ãû»òº¯ÊýÃû£©ÔÚÆäËüÎļþÖв»¿É¼û¡£Òò´ËÒ²³ÆΪ¡°Îļþ×÷ÓÃÓò¡±¡£
ÔÚC£«£«ÀàµÄ³ÉÔ±±äÁ¿±»ÉùÃ÷Ϊstatic£¨³ÆΪ¾²Ì¬³ÉÔ±±äÁ¿£©£¬Òâζ×ÅËü±»¸ÃÀàµÄËùÓÐʵÀýËù¹²Ïí£¬Ò²¾ÍÊÇ˵µ±Ä³¸öÀàµÄʵÀýÐÞ¸ÄÁ˸þ²Ì¬³ÉÔ±±ä
Á¿£¬ÆäÐÞ¸ÄֵΪ¸ÃÀàµÄÆäËüËùÓÐʵÀýËù¼û£»¶øÀàµÄ¾²Ì¬³ÉÔ±º¯ÊýÒ²Ö»ÄÜ·ÃÎʾ²Ì¬³ÉÔ±£¨±äÁ¿»òº¯Êý£©¡£ÀàµÄ¾²Ì¬³ÉÔ±±äÁ¿±ØÐëÔÚÉùÃ÷ËüµÄÎļþ
·¶Î§ÄÚ½øÐгõʼ»¯²ÅÄÜʹÓã¬privateÀàÐ͵ÄÒ²²»ÀýÍâ¡£
45¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡static_cast
Ó÷¨£ºstatic_cast¡¡¡¶¡¡type¡id¡¡¡·¡¡£¨¡¡expression¡¡£©¡¡
¸ÃÔËËã·û°Ñexpressionת»»Îªtype¡idÀàÐÍ£¬µ«Ã»ÓÐÔËÐÐʱÀàÐͼì²éÀ´±£Ö¤×ª»»µÄ°²È«ÐÔ¡£ËüÖ÷ÒªÓÐÈçϼ¸ÖÖÓ÷¨£º
¢ÙÓÃÓÚÀà²ã´Î½á¹¹ÖлùÀàºÍ×ÓÀàÖ®¼äÖ¸Õë»òÒýÓõÄת»»¡£
½øÐÐÉÏÐÐת»»£¨°Ñ×ÓÀàµÄÖ¸Õë»òÒýÓÃת»»³É»ùÀà±íʾ£©ÊÇ°²È«µÄ£»
½øÐÐÏÂÐÐת»»£¨°Ñ»ùÀàÖ¸Õë»òÒýÓÃת»»³É×ÓÀà±íʾ£©Ê±£¬ÓÉÓÚûÓж¯Ì¬ÀàÐͼì²é£¬ËùÒÔÊDz»°²È«µÄ¡£¢ÚÓÃÓÚ»ù±¾Êý¾ÝÀàÐÍÖ®¼äµÄת»»£¬Èç°Ñint
ת»»³Échar£¬°Ñintת»»³Éenum¡£ÕâÖÖת»»µÄ°²È«ÐÔÒ²Òª¿ª·¢ÈËÔ±À´±£Ö¤¡£
¢Û°Ñ¿ÕÖ¸Õëת»»³ÉÄ¿±êÀàÐ͵ĿÕÖ¸Õë¡£
¢Ü°ÑÈκÎÀàÐ͵ıí´ïʽת»»³ÉvoidÀàÐÍ¡£
×¢Ò⣺static_cast²»ÄÜת»»µôexpressionµÄconst¡¢volitale¡¢»òÕß__unalignedÊôÐÔ¡£
46¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡struct
struct£¨½á¹¹£©ÀàÐÍ£¬ÀàËÆÓÚclass¹Ø¼ü×Ö£¬ÓëCÓïÑÔ¼æÈÝ£¨class¹Ø¼ü×ÖÊDz»ÓëCÓïÑÔ¼æÈݵģ©£¬¿ÉÒÔʵÏÖÃæÏò¶ÔÏó³ÌÐòÉè¼Æ
47¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡switch
switch£¨×ª»»£©ÀàËÆÓÚif¡else¡ifÓï¾ä£¬ÊÇÒ»ÖÖ¶à·ÖÖ¦Óï¾ä¡£ËüÌṩÁËÒ»ÖÖ¼ò½àµÄÊéд£¬²¢ÇÒÄܹ»Éú³ÉЧÂʸüºÃµÄ´úÂë¡£µ«ÊÇ£¬switchºóÃæµÄ
ÅжÏÖ»ÄÜÊÇint£¨charÒ²¿ÉÒÔ£¬µ«char±¾ÖÊÉÏÒ²ÊÇÒ»ÖÖintÀàÐÍ£©¡£switchÓï¾ä×îºóµÄdefault·ÖÖ§ÊÇ¿ÉÑ¡µÄ¡£ÆäÓ÷¨Îª£º
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡switch£¨num£©
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£û
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡case¡¡0£º
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡break£»
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡case¡¡1£º
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡break£»
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡default£º
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£ý
48¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡template
template£¨Ä£°å£©£¬C£«£«ÖзºÐÍ»úÖƵÄʵÏÖ¡£
49¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡this
this·µ»Øµ÷ÓÃÕß±¾ÉíµÄÖ¸Õë¡£
50¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡throw
throw£¨Å׳ö£©ÓÃÓÚʵÏÖC£«£«µÄÒì³£´¦Àí»úÖÆ£¬¿ÉÒÔͨ¹ýthrow¹Ø¼ü×Ö¡°Å׳ö¡±Ò»¸öÒì³£¡£
51¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡true
true£¨ÕæµÄ£©£¬C£«£«µÄ»ù±¾Êý¾Ý½á¹¹boolÀàÐ͵ÄÖµÖ®Ò»¡£µÈͬÓÚintµÄ·Ç0Öµ¡£
52¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡try
try£¨³¢ÊÔ£©ÓÃÓÚʵÏÖC£«£«µÄÒì³£´¦Àí»úÖÆ¡£¿ÉÒÔÔÚtryÖе÷ÓÿÉÄÜÅ׳öÒì³£µÄº¯Êý£¬È»ºóÔÚtryºóÃæµÄcatchÖⶻñ²¢½øÐд¦Àí¡£¡¡
53¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡typedef
typedef£¨ÀàÐͶ¨Ò壬type¡¡define£©£¬Æä¸ñʽΪ£º
typedef¡¡¡¡ÀàÐÍ¡¡¶¨ÒåÃû£»
ÀàÐÍ˵Ã÷¶¨ÒåÁËÒ»¸öÊý¾ÝÀàÐ͵ÄÐÂÃû×Ö¶ø²»ÊǶ¨ÒåÒ»ÖÖеÄÊý¾ÝÀàÐÍ¡£¶¨ÒåÃû±íʾÕâ¸öÀàÐ͵ÄÐÂÃû×Ö¡£
54¡£¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡typeid
Ö¸³öÖ¸Õ