C/C++»ù´¡ÎÊÌâÕûÀí
ÕâƪÎÄÕÂÖмǼ±¾È˶ÔһЩC/C++»ù´¡¸ÅÄîµÄÀí½â£¬Ö÷Òª°üÀ¨ÒÔϼ¸¸ö·½ÃæÄÚÈÝ£º
1¡¢ÀàÐÍת»»
1¡¢ÀàÐÍת»»
ÔÚCºÍC++µÄÒ»¸ö±í´ïʽÖÐÍùÍù»á°üº¬¼¸ÖÖ²»Í¬µÄÊý¾ÝÀàÐÍ£¬ÒªÈÃÕâЩÊý¾ÝÀàÐÍÖ®¼ä¿ÉÒÔ½øÐÐÔËË㣬±ØÐëÈÃËûÃÇÖ®ÖеÄһЩ»òÈ«²¿½øÐÐÀàÐÍת»»£¬ÕâÖÖת»»ÓÐÁ½ÖÖÐÎʽ£¬Ò»ÖÖÊDZàÒëÆ÷×Ô¶¯½øÐеģ¬½ÐÒþʽÀàÐÍת»»£¬ÁíÒ»ÖÖÊDZà³ÌÖÐÇ¿ÖÆÖ´Ðеģ¬½ÐÇ¿ÖÆÀàÐÍת»»¡£
1.1¡¢ÒþʽÀàÐÍת»»
1.1.1¡¢Àý×Ó
Ê×ÏÈÓÉÁ½¸öÀý×ÓÀ´Òý³öÎÊÌ⣬·ÖÎöÏÂÃæÁ½¸öÀý×ÓµÄÊä³ö£º
ÀýÒ»£º
#include <stdio.h>
int main(int argc, char *argv[])
{
signed int a = -8;
unsigned int b = 4;
printf("%d\n", (a+b)/2);
return 0;
}
Àý¶þ£º
#include <stdio.h>
int main(int argc, char *argv[])
{
signed short a = -8;
unsigned short b = 4;
printf("%d\n", (a+b)/2);
return 0;
}
1.1.2¡¢ºÎʱ·¢Éúת»»
1¡¢ÔÚ»ìºÏÀàÐ͵ıí´ïʽÖУ¬²Ù×÷ÊýҪת»»³ÉÏàͬÀàÐÍ¡£
2¡¢ÓÃ×÷Ìõ¼þµÄ±í´ïʽÐèҪת»»³ÉboolÐÍ¡£Èçif()¡¢while()µÈ¡£
3¡¢³õʼ»¯»ò¸³Öµ²Ù×÷¡£
1.1.3¡¢¸÷ÖÖת»»·½Ê½
1¡¢ËãÊõת»»£º
ËãÊõת»»×î¼òµ¥µÄÊÇÕûÐÎÌáÉý£¬¶Ô±ÈintСµÄÕûÊýÀàÐ͵IJÙ×÷Êý£¬Èçchar,signed char, unsigned char, short, unsigned short£¬Èç¹ûintÄÜÈÝÄÉÏÂËûÃÇ£¬ÕâЩÊý¶¼×ª»»Îªint½øÐÐÔËË㣬Èç¹ûint²»ÄÜÈÝÄɾÍת»»Îªunsigned int£¬µ±intºÍunsigned intÒ»ÆðÔËËãʱ£¬×ª»»Îªunsigned int½øÐС£µ±ÓÐÆäËüÊý¾ÝÀàÐ͵IJÙ×÷ʱ£¬±ØÐë×ñÑÒ»¸öÔÔò¾ÍÊÇÔÚ²»¶ªÊ§¾«¶ÈµÄÇ°ÌáÏ£¬Óþ¡Á¿ÉÙµÄλÊý±íʾ¡£
2¡¢Ö¸Õëת»»£º
3¡¢ÓëboolÐÍÓйصÄת»»
4¡¢Óëö¾ÙÓйصÄת»»
5¡¢ÓëconstÓйصÄת»»
6¡¢Óɱê×¼¿âÀàÐͶ¨ÒåµÄת»»
Ïà¹ØÎĵµ£º
C/C++¹Ø¼ü×Östatic,const,inline,define,typedef
document.body.oncopy = function() {
if (window.clipboardData) {
setTimeout(function() {
......
Ò»¡¢XMLÖ»ÓÐÒ»¸öTableµÄÇé¿ö
£¨1£©userInfo.xml
<?xml version="1.0" encoding="utf-8" ?>
<UserInfo ......
C/C++ÄÚ´æÓëÔËÐÐʱÉîÈëÑо¿ [×÷ÕßJean.Love]
-----------------------------------------------------------------------------------
(Ò»)ÕûÊý·ûºÅµÄÏÝÚå
(¶þ)¸¡µãÊýµÄ±¾ÖÊ
(Èý)¶ÑÕ»µÄÄÚ´æ¹ÜÀí½á¹¹
(ËÄ)·ûºÅ½âÎö
(Îå)¶ÔÆëºÍ×ÜÏß´íÎó
(Áù)º¯ÊýÖ¸Õë
(Æß)Ð麯ÊýµÄÊ ......
ʲôÊÇsocket
³¤Á¬½ÓÓë¶ÌÁ¬½Ó
Ëùν³¤Á¬½Ó£¬Ö¸ÔÚÒ»¸öTCPÁ¬½ÓÉÏ¿ÉÒÔÁ¬Ðø·¢ËͶà¸öÊý¾Ý°ü£¬ÔÚTCPÁ¬½Ó±£³ÖÆڼ䣬Èç¹ûûÓÐÊý¾Ý°ü·¢ËÍ£¬ÐèҪ˫·½·¢¼ì²â°üÒÔά³Ö´ËÁ¬½Ó£¬Ò»°ãÐèÒª×Ô¼º×öÔÚÏßά³Ö¡£
¶ÌÁ¬½ÓÊÇָͨÐÅË«·½ÓÐÊý¾Ý½»»¥Ê±£¬¾Í½¨Á¢Ò»¸öTCPÁ¬½Ó£¬Êý¾Ý·¢ËÍÍê³Éºó£¬Ôò¶Ï¿ª´ËTCPÁ¬½Ó£¬Ò»°ãÒøÐж¼Ê¹ÓöÌÁ¬½Ó¡£
±ÈÈçht ......