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

¹ØÓÚC/C++º¯ÊýÉùÃ÷ÖвÎÊý¸öÊýµÄÒÉÎÊ

ÎÄÕÂ×÷ÕߣºSlyar
ÏÈ¿´Á½¸ö´úÂ룬µÚÒ»¸öÊÇC³ÌÐò£¬µÚ¶þ¸öÊÇC++³ÌÐò£¬³ýÁËÍ·Îļþ²»Í¬ÒÔÍâÆäËûµÄ¶¼Ò»Ñù¡£
//demo.c
#include <stdio.h>

int foo();

int main()
{
int a;
foo(a);
return 0;
}

int foo(int a)
{
}//demo.cpp
#include <iostream>

int foo();

int main()
{
int a;
foo(a);
return 0;
}

int foo(int a)
{
}
 ½á¹ûÊÇC³ÌÐò±àÒë³É¹¦£¬C++³ÌÐò±àÒëʧ°Ü£¬Ìáʾº¯ÊýÉùÃ÷ºÍº¯Êý¶¨Òå²ÎÊýÁÐ±í²»·û...ÕâºÜÕý³££¬¹Ø¼üÊÇC³ÌÐòÔõô¿ÉÄܱàÒëͨ¹ý...ÎÒÖªµÀC¿ÉÒÔд¿É±ä²ÎÊýÁÐ±í£¬ÎÊÌâÊÇÎÒû¼ÓÄǸö"..."°¡£¬囧£¬¿´À´ÊDZàÒëÆ÷µÄÎÊÌâÁË£¬ÒòΪ´úÂëÒ»Ñù...
²éÁËһЩ¹úÍâµÄ×ÊÁÏ£¬´óÖÂÁ˽âÁËÉÏÃæÄǸöÎÊÌâµÄ³ÉÒò£¬Í¬Ê±Ò²ÖªµÀÁËf()ºÍf(void)µÄÇø±ð£¬Ö®Ç°Ò»Ö±ÒÔΪËûÃÇÊÇÒ»ÑùµÄ...
In C, the declaration int f(void) means a function returning int that takes no parameters.
ÔÚCÓïÑÔÖУ¬f(void)±íÃ÷º¯Êý·µ»ØÕûÐͲ¢ÇÒûÓÐÈκβÎÊý¡£
The declaration int f() means a function returning int that takes any number of parameters.(takes an unknown number of parameters of unknown types, giving it the wrong number results in undefined behavior. )
¶øf()±íÃ÷º¯Êý·µ»ØÕûÐͲ¢ÇÒ¿ÉÒÔʹÓÃÈÎÒâ¸öÊýµÄ²ÎÊý£¬µ«ÊÇËûµÄÐÐΪÊDz»È·¶¨µÄ¡£
ÓÉ´Ë¿ÉÒÔ¿´³ö£¬ÔÚCÓïÑÔÖÐÊÇÍƼöʹÓÃf(void)ÕâÖÖÐÎʽµÄ£¬ÒòΪËüÃ÷È·Ö¸Ã÷Á˺¯ÊýûÓвÎÊý£¬f()ÓÉÓÚ¿ÉÒÔʹÓÃÈÎÒâ¸öÊýµÄ²ÎÊý£¬µ±È»Ò²°üÀ¨Ã»ÓвÎÊý¡£
¶øÔÚC++ÖУ¬ÎÒÏëÊDz»ÍƼöʹÓÃf(void)ÕâÖÖÐÎʽµÄ£¬ÒòΪf()ÒѾ­Ã÷È·±íÃ÷ûÓÐÈκβÎÊýÁË¡£


Ïà¹ØÎĵµ£º

»ùÓÚCÓïÑÔºÍGELÓïÑÔµÄFlash±à³Ìз½·¨(תÌû)

ÒÔTMS320VC5402ΪÀý£¬Ì½ÌÖÒ»ÖÖ×ÛºÏÔËÓÃCÓïÑÔ¡¢Êý¾ÝÎļþ¼°GELÓïÑÔµÄFlash±à³Ìз½·¨¡£
¡¡¡¡¸Ã·½·¨ÍêÈ«²ÉÓÃCÓïÑÔ±àдÉÕд³ÌÐò£¬½â¾öÁËÖ¸Õë²»ÄÜ·ÃÎʸ߶ËFlashµÄÎÊÌâ;°ÑÒýµ¼±í×÷³ÉÊý¾ÝÎļþ£¬¿ÉʵÏÖ´óÒýµ¼±íµÄ·ÖÅú´Î¼ÓÔØ;ͨ¹ýGEL³ÌÐò¿ØÖÆC³ÌÐòÖ´ÐУ¬½ÏºÃµØÌåÏÖÁËFlash±à³ÌµÄÁ÷³Ì¡£
¡¡¡¡ÒýÑÔ
¡¡¡¡ÔÚDSPÓ¦ÓÃϵͳ¿ª·¢µÄºóÆÚ£¬Ò»° ......

¡¾JavaÍøÂç±à³ÌÒ»¡¿Ò»¸ö¼òµ¥µÄc/s³ÌÐò

ʵÑéÒªÇó£º
1.±àд»ùÓÚTCPЭÒéµÄͨÐųÌÐò£¬°üÀ¨ServerÓëClientÁ½¸ö²¿·Ö¡£ÊµÏÖ»ØÉù³ÌÐò£º¼´¿Í»§¶Ë·¢ËÍÏûÏ¢£¬·þÎñÆ÷¶Ë½«ÊÕµ½µÄÏûÏ¢Ô­Ñù»áË͸ø¿Í»§¶Ë¡£
2.ÔÚµ¥»úÉÏÔËÐÐËüÃÇ£¬ÑéÖ¤ÆäͨÐŽá¹û£»
3.ÔÚ¶à»úÉÏÔËÐÐËüÃÇ£¬ÑéÖ¤ÆäͨÐŽá¹û£»£¨ChatServerÖ»ÐèÔËÐÐÔÚһ̨Ö÷»úÉÏ£¬ChatClient¿ÉÔÚÆäËüÖ÷»úÉÏÔËÐУ¨ÒªÖªµÀChatServerËùÔ ......

c ÓïÑÔÖеĴ«ÖµÓë´«ÒýÓÃ


#include<stdio.h>
int cubeByValue(int n);
int main(){
    int number = 5 ;
    printf("The original value of number is %d\n",number);
    number = cubeByValue(number);   
    printf("The new  ......

LinuxÖÐI2C×ÜÏßÇý¶¯Ìåϵ½á¹¹

×î½üÔÚ¿´Linux 2.6.21Äں˵ÄI2CÇý¶¯£¬Ò²ÔÚÍøÉϲéÁËÒ»ÏÂ×ÊÁÏ£¬ÓдíÒ²Óжԣ¬ÓÐЩÐĵ㬼ǼÏÂÀ´°É¡£ÀïÃæÈÏʶ»òÐí¶àÓв»µ±Ö®´¦£¬»¹¿ÒÇëÖ¸Õý¡£
 
1. I2C ЭÒé
 
 1.1  I2C×ÜÏß¹¤×÷Ô­Àí
      I2C×ÜÏßÊÇÓÉÊý¾ÝÏßSDAºÍʱÖÓSCL¹¹³ÉµÄ´®ÐÐ×ÜÏߣ¬¸÷ÖÖ±»¿ØÖÆÆ÷¼þ¾ù²¢ÁªÔÚÕâÌõ×ÜÏ ......

I2C×ÜÏßÔÚLinuxϵͳÖеÄÇý¶¯Éè¼Æ

1 ÒýÑÔ
¡¡¡¡Linux²Ù×÷ϵͳÒò¾ßÓÐÔ´´úÂ빫¿ª¡¢±ãÓڲüõ¡¢Óй㷺µÄ´¦ÀíÆ÷Ö§³ÖµÈÓŵ㣬³ÉΪµ±Ç°Ç¶ÈëʽϵͳµÄÈÈÃÅÑ¡Ôñ¡£»ùÓÚI2C×ÜÏߵļüÅÌÀ©Õ¹É豸Ö÷ÒªÓÃÓÚÂú×ãǶÈëʽÉ豸ÖжԶఴ¼üµÄÐèÇó£¬Çý¶¯³ÌÐòÔÚϵͳÆô¶¯Ê±¶ÔÓ²¼þ½øÐгõʼ»¯¡£ÔÚϵͳÆô¶¯ºóʵÏÖÓ²¼þºÍÓ¦ÓóÌÐòÖ®¼äµÄÊý¾Ý½»»¥¡£Õë¶ÔS3C2410΢´¦ÀíÆ÷ºÍ¼üÅÌɨÃè¹ÜÀíÆ÷¼þ£¬ÉîÈ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ