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

C/C++Ö¸ÕëºÍÊý×éµÄʹÓúÍÇø±ð

        
³£¼ûµÄÄÚ´æ·ÖÅäºÍʹÓôíÎó
1) ÄÚ´æµÄÉêÇëºÍ·ÖÅ䲢ûÓгɹ¦£¬µ«³ÌÐòԱȴʹÓÃÁËËü¡£Ò»Ð©ÐÂÊÖ¾­³£»á·¸ÕâÖÖ´íÎó£¬ËûÃDz¢²»»áÁôÒâµ½ÄÚ´æûÓзÖÅä³É¹¦¡£ÅжÏÖ¸ÕëµÄÖµÊÇ·ñΪNULL¿ÉÒÔÓÐЧµØ±ÜÃâÕâÖÖ´íÎó¡£
2) ÄÚ´æµÄ·ÖÅäÒѾ­³É¹¦£¬µ«ÊÇȴûÓнøÐгõʼ»¯¾ÍÖ±½ÓʹÓÃËüÁË¡£Ê×ÏÈÊǹÛÄîÉϵÄÎÊÌ⣬ºÜ¶àÈ˶¼Ã»ÓÐÔÚʹÓÃÖ¸ÕëÇ°Òª³õʼ»¯ÕâÑùµÄÏ°¹ß£¬È»¶øÕâ¸öÏ°¹ßÈ´ÊǺÜÖØÒªµÄ£¬Ï£Íû´ó¼ÒÒ»¶¨ÒªÇ¿ÆÈ×Ô¼ºÑø³É¡£µÚ¶þ¾ÍÊÇÖ÷¹ÛµØÈÏΪ×Ô¼ºÉêÇëµÄÄÚ´æµÄȱʡֵΪ0£¬ÕâÑùÏëÊÇûÓÐʲôµÀÀíµÄ£¬ÄÚ´æ·ÖÅäºóµÄÖµÊDz»È·¶¨µÄ¡£
3) ÉÏÃæµÄÁ½ÖÖ¹¤×÷¶¼ÒѾ­×öºÃÁË£¨ÒѾ­³É¹¦ÉêÇë²¢³õʼ»¯Íê³É£©£¬µ«ÊDzÙ×÷ʱȴԽ½çÁË¡£
4) ÉêÇëÁËÄڴ棬ʹÓÃÍêÁËÈ´Íü¼ÇÁËÊÍ·Å£¬µ¼ÖÂÄÚ´æй¶¡£ÕâÑùµÄ´íÎó¿ÉÒÔÐÎÈÝΪһ¸ö¶ñÐÔµÄÖ×Áö£¬Ëü²»»áÂíÉÏÒªÄãµÄÃü£¬µ«ÊÇËü»áÂýÂýµØÍÌÊÉÄãµÄϵͳ×ÊÔ´£¬Ö±µ½ÄãµÄ³ÌÐò³¹µ×Íêµ°¡£
5) ÄãºÜСÐĵØÊÍ·ÅÁËÄڴ棬µ«ÊÇÈ´ÓÖʹÓÃÁËËü¡£ÓÉÓÚ³ÌÐòºÜ¸´ÔÓ»òÕßµ÷ÓÃ˳Ðò³ö´í£¬ÕâÑù¿ÉÄܵ¼Ö³öÏÖÉÏÃæµÄ´íÎó¡£
Ö¸Õë---Ò»°Ñΰ´óµÄË«Èн£
ÎÒÕæµÄ·Ç³£Åå·þ·¢Ã÷Ö¸ÕëµÄÈË£¬Ëû¼òֱ̫ΰ´óÁË¡£ÄÜʹÓÃÈç´Ë¼ò½àµØ·½·¨½«¸´ÔÓµÄÄÚ´æ½á¹¹ÃèÊöµÄÈç´ËÇå³þ£¬Õâ±¾Éí¾ÍÊÇÒ»ÖÖΰ´óµÄ³É¾Í¡£µ«ÊÇ£¬Ö¸ÕëÖ®ÓÚ³ÌÐòÔ±ÈçͬÎäÆ÷Ö®ÓÚÊ¿±ø£¬ÓúÃÁË¿ÉÒÔÍþÁ¦Îޱȣ¬Óò»ºÃÔòº¦È˺¦¼º¡£
ÎÒÏÈ˵˵ָÕëºÍÊý×éµÄÇø±ð¡£Êý×éÃû¶ÔÓ¦×ÅÒ»¿éÄڴ棬ËüµÄµØÖ·¡¢ÈÝÁ¿ÔÚÆäÉúÃüÖÜÆÚÖÐÊDz»¿É±äµÄ£¬Ö»ÓÐÊý×éÄÚÈÝÊǿɱäµÄ¡£Ö¸Õë¿ÉËæʱָÏòÈκÎÀàÐ͵ÄÄڴ棬ËüµÄÌصã¾ÍÊÇ“±ä”¡£Ö¸ÕëÔ¶±ÈÊý×éÁé»î£¬µ«Ò²¸üΣÏÕ¡£
Êý×éÃûÊDz»ÄÜÖ±½Ó½øÐи³ÖµºÍ±È½ÏµÄ¡£Èç¹ûÄãÏòÒª½«Êý×éa¸³Öµ¸øÊý×éb£¬²»ÄÜÖ±½ÓÓø³ÖµÓï¾äb = a £¬ÕâÑù»áÁî±àÒëÆ÷²úÉú´íÎóµÄ¡£±ØÐëʹÓñê×¼µÄ¿âº¯ÊýstrcpyÀ´½øÐи³Öµ¡£ÏàͬµØ£¬Òª±È½ÏaºÍbµÄÄÚÈÝÊÇ·ñÏàͬ£¬²»ÄÜʹÓÃÆÕͨµÄÂß¼­ÅжÏif£¨b==a£©£¬Ò²ÒªÓ¦Óÿ⺯ÊýstrcmpÀ´Åжϡ£
//Êý×é……
        char *p = (char *)malloc(100);
strcpy(p, “hello”);
free(p); // the address of “p” is not changed.
….
if (NULL != p) //it will return TRUE
strcpy(p, “world”); //Wrong!!!
 
ÔÚ¼ÆËãÄÚ´æÈÝÁ¿µÄʱºòÓÐÒ»µãÊDZØÐëÒªÖ¸³öµÄ£¬ÄǾÍÊÇsizeof¼ÆËãÊý×éÊǼÆËãËüµÄʵ¼ÊµÄÄÚ´æÈÝÁ¿£¬¶ø¼ÆËãÖ¸ÕëʱÔòÓÀÔ¶¶¼ÊÇ4¸ö×Ö½Ú¡£C++ÊÇÓÀԶûÓа취֪µÀÖ¸ÕëËùÖ¸µÄÄÚ´æÈÝÁ¿£¬³ý·


Ïà¹ØÎĵµ£º

c/s(C#)ÏÂFtpµÄ¶àÎļþÉÏ´«¼°ÆäÉÏ´«½ø¶È

ÒòΪÏîÄ¿ÒªÇó£¬ÖÆ×÷µÄÒ»¸ö¶àÎļþÉÏ´«£¬²¢ÏÔʾ½ø¶ÈÌõÒ»¶Î´úÂë(vs2005»·¾³)¡£
(ֻΪ´ÖÂÔµÄʵÏÖ£¬´úÂë²¢²»¹æ·¶)
µ±¶à¸öÎļþÉÏ´«µÄʱºò£¬ÐèÒªÒÀ´Î¶ÓÁÐÐÎʽһ¸ö¸öÉÏ´«£¬µ±ÉÏ´«Ä³¸öÎļþµÄʱºò£¬Ëø¶¨½ø³Ì£¬ÉÏ´«Íê±ÏÔÙ¿ªÆôËø¡£
ÔÚÖ÷ÀàÖеÄÉÏ´«°´Å¥Ê¼þ´úÂë: 
//
»ñÈ¡openFileDialog¿Ø¼þÑ¡ÔñµÄÎļþÃûÊý×é(openFileDialog¿É ......

CÖÐÈ«¾Ö±äÁ¿ºÍº¯ÊýÉùÃ÷µÄÈÏʶ

ÔÚCÖпÉÒÔ¶¨ÒåÈ«¾Ö±äÁ¿£¬È«¾Ö±äÁ¿ÊÇÔÚ³ÌÐò¼ÓÔسõʼ»¯Ê±·ÖÅä¿Õ¼ä²¢½øÐгõʼ»¯¡£ÔÚc´úÂëÖж¨Òå/ÉùÃ÷È«¾Ö±äÁ¿µÄ·½Ê½ÈçÏÂ
1. int n;
    ¶¨Òå»òÕßÉùÃ÷£¨Èç¹ûÔÚÆäËûÎļþÖÐÒѶ¨Ò壩ȫ¾Ö±äÁ¿¡£
2. int n = 10;
    ¶¨ÒåÈ«¾Ö±äÁ¿²¢³õʼ»¯¡£
3. extern int n;
    ÉùÃ÷ÔÚÍⲿ¶¨Ò ......

CÖеĿɱä²ÎÊýÑо¿

CÖеĿɱä²ÎÊýÑо¿
Ò»£® ºÎν¿É±ä²ÎÊý
int
printf( const char* format, ...);
ÕâÊÇʹÓùýCÓïÑÔµÄÈËËùÔÙÊìϤ²»¹ýµÄprintfº¯ÊýÔ­ÐÍ£¬ËüµÄ²ÎÊýÖÐ
¾ÍÓй̶¨²ÎÊýformatºÍ¿É±ä²ÎÊý£¨ÓÔ…”±íʾ£©. ¶øÎÒÃÇÓÖ¿ÉÒÔÓø÷ÖÖ·½Ê½À´µ÷ÓÃprintf,Èç:
printf("%d",value);

printf("%s",s ......

linux I2CÇý¶¯·ÖÎö

I2CÊÇPhillips¿ª·¢µÄ2ÏߵĴ®ÐÐ×ÜÏßЭÒ顣ͨ³£Ó¦ÓÃÔÚǶÈëʽϵͳÖÐÈò»Í¬µÄ×é¼þͨÐÅ£¬PCÖ÷°å¿ÉÒÔͨ¹ýI2CÀ´Ó벻ͬµÄ´«¸ÐÆ÷ͨÐÅ¡£ÕâЩ´«¸ÐÆ÷ͨ³£±¨¸æ·çÉÈËٶȣ¬´¦ÀíÆ÷ζȺÍÕû¸öÓ²¼þϵͳµÄÐÅÏ¢£¬Õâ¸öЭÒéÒ²¿ÉÒÔÓÃÔÚRAM chipsÉÏ£¬Ïò²Ù×÷ϵͳÌṩDIMMµÄÐÅÏ¢¡£
ÔÚ2.0ʱI2CµÄkernelÔ´Âë²»ÔÚÄÚºËÀïµÄ£¬2.4Äں˰üÀ¨ÁËÒ»µã¶ÔI2CµÄÖ§³Ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ