C/C++»ù±¾Êý¾ÝÀàÐÍ
ѧÁËCÈ»ºóC++£¬È»ºóMFC/Windows,È»ºóÊÇC#,ÆäÖÐÊý¾ÝÀàÐͺܶ࣬ÓÉ»ù±¾ÀàÐÍÑÜÉúµÄtypedefÀàÐÍÒ²N¶à¡£ÊìÖª»ù±¾Êý¾ÝÀàÐÍÊÇÎÒÃÇÕýÈ·±í´ïʵ¼ÊÎÊÌâÖи÷ÖÖÊý¾ÝµÄÇ°ÌᣬÒò´ËÎÒ·ÖÀà×ܽáÁËÒ»ÏÂC/C++/Windows /C#»ù±¾Êý¾ÝÀàÐÍ£¬ÒÔ±ãÈÕºó²éÔÄ¡£
ANSI C/C++»ù±¾Êý¾ÝÀàÐÍ£º
Type
Size
ÊýÖµ·¶Î§
ÎÞÖµÐÍvoid
0 byte
ÎÞÖµÓò
²¼¶ûÐÍbool
1 byte
true false
ÓзûºÅ¶ÌÕûÐÍshort [int] /signed short [int]
2 byte
-32768~32767
ÎÞ·ûºÅ¶ÌÕûÐÍunsigned short [int]
2 byte
0~65535
ÓзûºÅÕûÐÍint /signed [int]
4 byte
-2147483648~2147483647
ÎÞ·ûºÅÕûÐÍunsigned [int]
4 byte
0~4294967295
ÓзûºÅ³¤ÕûÐÍlong [int]/signed long [int]
4 byte
-2147483648~2147483647
ÎÞ·ûºÅ³¤ÕûÐÍunsigned long [int]
4 byte
0~4294967295
long long
8 byte
0~18446744073709552000
ÓзûºÅ×Ö·ûÐÍchar/signed char
1 byte
-128~127
ÎÞ·ûºÅ×Ö·ûÐÍunsigned char
1 byte
0~255
¿í×Ö·ûÐÍwchar_t (unsigned short.)
2 byte
0~65535
µ¥¾«¶È¸¡µãÐÍfloat
4 byte
-3.4E-38~3.4E+38
Ë«¾«¶È¸¡µãÐÍdouble
8 byte
1.7E-308~1.7E+308
long double
8 byte
˵Ã÷£º
£¨1£©ÀàÐÍÐÞÊηûsignedºÍunsignedÓÃÓÚÐÞÊÎ×Ö·ûÐͺÍÕûÐΡ£
£¨2£©ÀàÐÍÐÞÊηûshortºÍlongÓÃÓÚÐÞÊÎ×Ö·ûÐͺÍÕûÐΡ£
£¨3£©µ±ÓÃsignedºÍunsigned¡¢shortºÍlongÐÞÊÎintÕûÐÎʱ£¬int¿ÉÊ¡ÂÔ¡£
£¨4£©ÆäÖÐboolºÍwchar_tÊÇC++ÌØÓеġ£
£¨5£©³ýÉϱíÒÔÍ⣬C/C++¶¼¿ÉÒÔ×Ô¶¨Òåö¾Ùenum¡¢ÁªºÏunionºÍstruct½á¹¹ÌåÀàÐÍ¡£
£¨6£©ÒÔÉÏsizeofͨ¹ýWindows XP 32λƽ̨²âÊÔ£¬ÆäÖÐijЩÀàÐÍÊý¾ÝµÄ×Ö½ÚÊýºÍÊýÖµ·¶Î§ÓɲÙ×÷ϵͳºÍ±àÒëƽ̨¾ö¶¨¡£±ÈÈç16λ»úÉÏ£¬sizeof(int) = 2£¬¶ø32λ»úÉÏsizeof(int) = 4£»32λ»úÉÏsizeof(long) = 4£¬¶ø64λ»úÉÏsizeof(long) = 8¡£³ý´ËÖ®Í⣬עÒâ64λ»úÉϵÄpointerÕ¼8byte¡£
£¨7£©voidµÄ×ÖÃæÒâ˼ÊÇ“ÎÞÀàÐÍ”£¬²»ÄÜÓÃÀ´¶¨Òå±äÁ¿¡£voidÕæÕý·¢»ÓµÄ×÷ÓÃÔÚÓÚ£º<1> ¶Ôº¯Êý·µ»ØºÍº¯Êý²ÎÊýµÄÏÞ¶¨£¬ÀýÈç×Ô¶¨Òå¼È²»´ø²ÎÊýÒ²ÎÞ·µ»ØÖµµÄº¯Êývoid MyFunc(void);<2>¶¨ÒåÎÞÀàÐÍͨÓÃÖ¸Õëvoid *£¬Ö¸ÏòÈκÎÀàÐ͵ÄÊý¾Ý¡£
£¨8£©±ê×¼C++¿â¼°STL»¹ÌṩÁËͨÓÃÊý¾Ý½á¹¹£º×Ö·û´®Ààstring£»ÏòÁ¿ÀàÄ£°åvector£»Ë«¶Ë¶ÓÁÐÀàÄ£°ådeque£»Á´±íÀàÄ£°ålist£»ÈÝÆ÷ÊÊÅäÆ÷¶ÑÕ»Ààstack£¨ÊµÏ
Ïà¹ØÎĵµ£º
±àÒ룺C³ÌÐòÖ±½Ó±àÒë³É±ê×¼µÄ¶þ½øÖÆ¿ÉÖ´ÐеĴúÂ룬µ«C#µÄÔ´³ÌÐò²¢²»ÊDZ»±àÒë³É¶þ½øÖÆ¿ÉÖ´ÐеÄÐÎʽ£¬¶øÊÇÒ»ÖÖÖмäÓïÑÔ£¨MSIL£©£¬ÀàËÆJAVAÖеÄ×Ö½ÚÂë
½á¹¹Ì壺C#µÄ½á¹¹ÌåÓëC++µÄ½á¹¹ÌåÏàËÆ¡£µ«ÊÇC#µÄ½á¹¹ÌåÓëÀàÊDz»Í¬µÄ£¬¶øÇÒ²»Ö§³Ö¼Ì³Ð¡£
Ô¤±àÒ룺C#ÖдæÔÚÔ¤±àÒëµÄÖ¸ÁîÖ§³ÖÌõ¼þ±àÒ룬¾¯¸æ£¬´íÎ󱨸æºÍ±àÒëÐпØÖÆ¡£ÆäÖ¸Áî ......
ǰЩÌì¿´ÁËÀî¸Õ<struts2+hibernate+spring>ÄÇÊéÉϵÄhibernate£¬ÅäÖÃÎļþÒ²ÊÇ°´ÕÕÉÏÃæÇýøhibernate.cfg.xmlÎļþµÄ£¬Student.javaÅäÖõÄStudent.hbm.xmlÎļþ¾õµÃҲûʲôÎÊÌ⣬µ«²»Öªµ½Ôõô»ØʾÍÊDZ¨ connection can not open¡£ÓôÃÆ°¡£¬ºóÀ´ÎҾͰÑÊéÀïÃæµÄÅäÖÃÎļþºÍÔ´Â룬¸´ÖƵ½MyEclipseÏÂÃæµÄÒ»¸öÐÂwebÏîÄ¿ÖУ¬ÔËÐ ......
µÚÒ»²¿·ÖÈí¼þ±à³ÌµÄʱ¼ä·ÖÅä¸Å¿ö
¸ßЧÂʵijÌÐòÔ±²¢²»ÊÇÇüüÅ̵ÄËٶȱȱðÈ˿죬¶øÊÇËûÓÐ×ÅÁ¼ºÃµÄ±à³ÌÏ°¹ß£¬½ÚÊ¡Á˱ðÈËÀ˷ѵÄʱ¼ä¡£Òò´Ë£¬ÒªÏëÌá¸ß×Ô¼ºµÄ±à³ÌЧÂÊ£¬¸ù±¾ÔÚÓÚÔõôÉÙÀË·Ñʱ¼ä¡£Ö»ÒªÄܰѱðÈËÀ˷ѵÄʱ¼ä½ÚÊ¡ÏÂÀ´£¬ÄãµÄЧÂʾͿÉÒÔ¿ì¹ý±ðÈË£¬ÉõÖÁÊý±¶ÓÚ±ðÈË¡£ÒªÏë½Úʡʱ¼ä£¬µ±È»Ê×ÏÈÐèÒªÃ÷°×±à³ÌÖкķ ......