C/C++ÓïÑÔÖи÷ÖÖÊý¾ÝÀàÐͳ¤¶ÈµÄ×ܽá
ÏÂÃæÊÇÎÒ¹ØÓÚCÓïÑÔÖи÷ÖÖÊý¾ÝÀàÐͳ¤¶ÈµÄ×ܽ᣺(²Î¿¼The C Programming Language)
1. cÓïÑÔÖеÄÕûÊýÀàÐÍÓÐchar, short, int, longµÈ¼¸ÖÖ, ÏÂÃæÊÇCÓïÑÔ¶ÔÿÖÖÊý¾ÝÀàÐͳ¤¶ÈµÄ¹æ¶¨:
(a). shortºÍlongÀàÐ͵ij¤¶È²»Ïàͬ
(b). intÀàÐÍͨ³£Í¬¾ßÌå»úÆ÷µÄÎïÀí×Ö³¤Ïàͬ
(c). shortͨ³£ÊÇ16bits, intͨ³£ÊÇ16bits or 32bitsÿÖÖ±àÒëÆ÷¿ÉÒÔ¸ù¾ÝÓ²¼þµÄ²»Í¬×ÔÓÉÈ·¶¨, µ«ÊÇshortºÍint±ØÐë×îÉÙÊÇ16bits, ¶ølongÀàÐͱØÐë×îÉÙÊÇ32bits, ²¢ÇÒshort±ØÐë±ÈintºÍlongÀàÐÍÒª¶Ì¡£
2. sizeof() ÔËËã·û·µ»ØµÄÊÇÒ»ÖÖÊý¾ÝÀàÐÍÖÐËù°üº¬µÄ×Ö½ÚÊý(bytes), AnsiC¹æ¶¨sizeof(char)±ØÐë·µ»Ø1£¬µ±sizeof×÷ÓÃÓÚÊý×éʱ, ·µ»ØµÄÊÇÊý×éÖÐËùÓгÉÔ±ËùÕ¼µÄ×Ö½ÚÊý(×¢Òâ²¢²»ÊÇÊý×éÖгÉÔ±µÄ¸öÊý), µ±sizeof()×÷ÓÃÓڽṹÌåºÍ¹«ÓÃÌåʱ,·µ»ØµÄ²»½ö½öÊÇÊý¾Ý³ÉÔ±×ܵÄ×Ö½ÚÊý, »¹°üÀ¨±àÒëÆ÷ΪÁËʵÏÖ×Ö½Ú¶ÔÆä¶øÌî³äµÄÄÇЩ×Ö½Ú¡£
ÒÔǰд³ÌÐòÒ²ÒþÒþÔ¼Ô¼µÄ¶®µÃÕâЩ¹æÔò£¬µ«ÊÇÒ»Ö±ÒÔΪcharÀàÐͱØÐëÊÇ8bitsµÄ£¬µ«ÊÇ×î½ü×öÁËÒ»¸öǶÈëʽDSPÏîÄ¿£¬±àÒëÆ÷ÊÖ²áÉÏÃ÷Ã÷д×ÅcharÀàÐ;ÍÊÇ16bitsµÄ£¬ÎÞÄη³ö"The C Programming Language"Ò»²é²Å·¢ÏÖANSI C¶ÔÓÚcharÀàÐ͵ij¤¶È²¢Ã»ÓÐ×÷Ó²ÐԹ涨¡£ÒÔǰд³ÌÐò²»Ì«×¢ÒâÊý¾ÝÀàÐ͵ĿÉÒÆÖ²ÐÔ, Õâ´ÎÏîÄ¿ÖÐÓõ½µÄÒÔÇ°µÄ´úÂ붼ҪÖØмì²éÊý¾ÝÀàÐͳ¤¶ÈµÄÎÊÌâ¡£
C++Êý¾ÝÀàÐͳ¤¶ÈÎÊÌâ:
Ò»¡¢×Ö½ÚºÍ×Ö³¤
×Ö½Ú£¬°Ëλ¾ÍÊÇÒ»¸ö×Ö½Ú£¬Êǹ̶¨¸ÅÄî¡£×Ö³¤ÊÇÖ¸¼ÆËã»úÒ»´ÎÄÜ´¦ÀíµÄ¶þ½øÖÆÊý¾ÝµÄ³¤¶È£¬ÊÇÒ»¸ö·Ç¹Ì¶¨µÄ¸ÅÄî¡£ÀýÈ磬8λ¼ÆËã»úµÄ×Ö³¤Îª8£¬¼´Ò»¸ö×Ö½Ú£¬ 32λ¼ÆËã»úµÄ×Ö³¤Î»32£¬¼´4¸ö×Ö½Ú£¬Í¬Àí£¬64λ¼ÆËã»úµÄ×Ö³¤Îª64£¬¼´8×Ö½Ú¡£
¶þ¡¢C++ÖеÄÊý¾ÝÀàÐÍ
1¡¢×Ö·ûÐÍÊý¾Ýchar£¬¸ÃÀàÐÍʼÖÕÊÇÒ»¸ö×Ö½Ú³¤£¬¼´8λ¡£
2¡¢ÕûÐÎint¡¢¶ÌÕûÐÍshortºÍ³¤ÕûÐÎlong¡£Í¨³£intΪһ¸ö×Ö³¤£¬shortΪ°ë¸ö×Ö³¤£¬longΪһ¸ö»ò2¸ö×Ö³¤£¨ÔÚ32λ»úÆ÷ÖÐΪһ¸ö×Ö³¤£©¡£
3¡¢¸¡µãÐÍfloat¡¢Ë«¾«¶Èdouble¡¢ºÍ³¤Ë«¾«¶Èlong double£¬·Ö±ð±íʾµ¥¾«¶È¸¡µãÊý Ë«¾«¶È¸¡µãÊýºÍÀ©Õ¹¾«¶ÈµÄ¸¡µãÊýÖµ¡£µäÐÍÇé¿öÏ£¬float Ϊһ¸ö×Ö£¬doubleÊÇÁ½¸ö×Ö£¬long doubleΪÈý¸ö»òËĸö×Ö¡£
Ïà¹ØÎĵµ£º
ÍøÉÏÒ»µÀ½ðɽµÄÃæÊÔÌ⣺
http://topic.csdn.net/u/20100524/14/0eff992a-2849-4db6-bdaa-d4a200e79b7c.html
Çë·Ö±ðÓÃC++µÄÃæÏò¶ÔÏóºÍ·ºÐÍ»úÖÆ£¬±àдʵÏÖTemplate MethodģʽµÄʾÀý´úÂ룬²¢±È½ÏÁ½ÖÖ·½Ê½¸÷×ÔµÄÓÅȱµã¡£
ÓÃÐ麯ÊýʵÏÖTemplate MethodµÄ·½Ê½¾Í²»¶à˵ÁË¡£Ó÷ºÐ͵ķ½Ê½ÊµÏÖ¶à̬ÔÚATLÀïÃæÓдóÁ¿µÄÓõ½£¡
·ºÐ͵ ......
1. ÔõÑù½¨Á¢ºÍÀí½â·Ç³£¸´ÔÓµÄÉùÃ÷£¿ÀýÈ綨ÒåÒ»¸ö°üº¬N ¸öÖ¸Ïò·µ»ØÖ¸Ïò×Ö·ûµÄÖ¸ÕëµÄº¯ÊýµÄÖ¸ÕëµÄÊý×飿
Õâ¸öÎÊÌâÖÁÉÙÓÐÒÔÏÂ3 ÖÖ´ð°¸:
1. char *(*(*a[N])())();
2. ÓÃtypedef Öð²½Íê³ÉÉùÃ÷:
typedef char *pc; /* ×Ö·ûÖ¸Õë*/
typedef pc fpc(); /* ·µ»Ø×Ö·ûÖ¸ÕëµÄº¯Êý*/
typedef fpc *pfpc; /* ÉÏÃ溯ÊýµÄÖ¸Õë*/ ......
½ñÌìÊÇ5ÔµÄ×îºóÒ»ÌìÁË£¬2010ÄêµÄ5Ô£¬µ¹Ã¹µÄÒ»¸öÔÂÖÕÓÚÒª¹ýÈ¥ÁË¡£½ñÌì³é¿ÕÎÒÓÖ¶ÁÍêÁ˵ÚÈýÕ£¬Ë³±ã×öϱʼǡ£
ÕâÒ»ÕµÄÌâÄ¿½Ð×ö---ÓïÒå“ÏÝÚå”
³ÌÐòÒ²ÓпÉÄܱíÃæ¿´ÉÏÈ¥ÊÇÒ»¸öÒâ˼£¬Êµ¼ÊÉϵÄÒâ˼ȴÏàÈ¥ÉõÔ¶¡£
¶ÔÓÚÊý×飺
CÓïÑÔÖÐÖ»ÓÐһάÊý×飬 ......
Ëü¿ÉÒÔµ¼Èë¿â£¬µ÷ÓÃÍâÃæµÄ¿âº¯Êý£¬javaÓïÑԾͺܺõĵØÀûÓÃÁËÕâÒ»µã£¬jspÒ²¿ÉÒÔÔÚÍøÒ³Öе÷ÓÃjava±àдºÃµÄ³ÌÐò£¬ÒªÊ¹ÓÃjavabean±êÇ©
struts±¾Éí¾ÍÊǶÔjava¼¼ÊõÒ»¸ö°ü×°,°üÀ¨£¬html,jsp¼°±êÇ©,servlet¡£
hibernateÊDZðÈ˱àдºÃÓ³ÉäÊý¾Ý¿âµÄ¹¤¾ß£¬Æä´úÂ붼ÊÇÓÃjavaÓïÑÔ±àдµÄ£¬Ö»ÊÇΪÁË·½±ãÓû§Ê¹Óã¬Óû§Ö»Òªµ¼ÈëÆä¿â£¬µ÷ÓÃÆ ......