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

c ÓïÑÔÏÝÚå

Ô­Öø£ºAndrew Koenig - AT&T Bell Laboratories Murray Hill, New Jersey 07094
·­Ò룺lover_P
0 ¼ò½é
    CÓïÑÔ¼°ÆäµäÐÍʵÏÖ±»Éè¼ÆΪÄܱ»×¨¼ÒÃÇÈÝÒ×µØʹÓá£ÕâÃÅÓïÑÔ¼ò½à²¢¸½Óбí´ïÁ¦¡£µ«ÓÐһЩÏÞÖÆ¿ÉÒÔ±£»¤ÄÇЩ¸¡ÔêµÄÈË¡£Ò»¸ö¸¡ÔêµÄÈË¿ÉÒÔ´ÓÕâЩÌõ¿îÖлñµÃһЩ°ïÖú¡£
    ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«»á¿´Ò»¿´ÕâЩδ¿ÉÖªµÄÒæ´¦¡£ÕâÊÇÓÉÓÚËüµÄδ¿ÉÖª£¬ÎÒÃÇÎÞ·¨ÎªÆä½øÐÐÍêÈ«µÄ·ÖÀà¡£²»¹ý£¬ÎÒÃÇÈÔȻͨ¹ýÑо¿ÎªÁËÒ»¸öC³ÌÐòµÄÔËÐÐËùÐèÒª×öµÄÊÂÀ´×öµ½ÕâЩ¡£ÎÒÃǼÙÉè¶ÁÕ߶ÔCÓïÑÔÖÁÉÙÓиö´ÖdzµÄÁ˽⡣
    µÚÒ»²¿·ÖÑо¿Á˵±³ÌÐò±»»®·ÖΪ¼ÇºÅʱ»á·¢ÉúµÄÎÊÌâ¡£µÚ¶þ²¿·Ö¼ÌÐøÑо¿Á˵±³ÌÐòµÄ¼ÇºÅ±»±àÒëÆ÷×éºÏΪÉùÃ÷¡¢±í´ïʽºÍÓï¾äʱ»á³öÏÖµÄÎÊÌâ¡£µÚÈý²¿·ÖÑо¿ÁËÓɶà¸ö²¿·Ö×é³É¡¢·Ö±ð±àÒë²¢°ó¶¨µ½Ò»ÆðµÄC³ÌÐò¡£µÚËIJ¿·Ö´¦ÀíÁ˸ÅÄîÉϵÄÎó½â£ºµ±Ò»¸ö³ÌÐò¾ßÌåÖ´ÐÐʱ»á·¢ÉúµÄÊÂÇé¡£µÚÎ岿·ÖÑо¿ÁËÎÒÃǵijÌÐòºÍËüÃÇËùʹÓõij£ÓÿâÖ®¼äµÄ¹Øϵ¡£ÔÚµÚÁù²¿·ÖÖУ¬ÎÒÃÇ×¢Òâµ½ÁËÎÒÃÇËùдµÄ³ÌÐòÒ²²»²¢²»ÊÇÎÒÃÇËùÔËÐеijÌÐò£»Ô¤´¦ÀíÆ÷½«Ê×ÏÈÔËÐС£×îºó£¬µÚÆß²¿·ÖÌÖÂÛÁË¿ÉÒÆÖ²ÐÔÎÊÌ⣺һ¸öÄÜÔÚÒ»¸öʵÏÖÖÐÔËÐеijÌÐòÎÞ·¨ÔÚÁíÒ»¸öʵÏÖÖÐÔËÐеÄÔ­Òò¡£
1 ´Ê·¨È±ÏÝ
    ±àÒëÆ÷µÄµÚÒ»¸ö²¿·Ö³£±»³ÆΪ´Ê·¨·ÖÎöÆ÷£¨lexical analyzer£©¡£´Ê·¨·ÖÎöÆ÷¼ì²é×é³É³ÌÐòµÄ×Ö·ûÐòÁУ¬²¢½«ËüÃÇ»®·ÖΪ¼ÇºÅ£¨token£©Ò»¸ö¼ÇºÅÊÇÒ»¸öÓÐÒ»¸ö»ò¶à¸ö×Ö·ûµÄÐòÁУ¬ËüÔÚÓïÑÔ±»±àÒëʱ¾ßÓÐÒ»¸ö£¨Ïà¹ØµØ£©Í³Ò»µÄÒâÒå¡£ÔÚCÖУ¬ ÀýÈ磬¼ÇºÅ->µÄÒâÒåºÍ×é³ÉËüµÄÿ¸ö¶ÀÁ¢µÄ×Ö·û¾ßÓÐÃ÷ÏÔµÄÇø±ð£¬¶øÇÒÆäÒâÒå¶ÀÁ¢ÓÚ->³öÏÖµÄÉÏÏÂÎÄ»·¾³¡£
    ÁíÍâÒ»¸öÀý×Ó£¬¿¼ÂÇÏÂÃæµÄÓï¾ä£º
if(x > big) big = x;
¸ÃÓï¾äÖеÄÿһ¸ö·ÖÀëµÄ×Ö·û¶¼±»»®·ÖΪһ¸ö¼ÇºÅ£¬³ýÁ˹ؼü×ÖifºÍ±êʶ·ûbigµÄÁ½¸öʵÀý¡£
    ÊÂʵÉÏ£¬C³ÌÐò±»Á½´Î»®·ÖΪ¼ÇºÅ¡£Ê×ÏÈÊÇÔ¤´¦ÀíÆ÷¶ÁÈ¡³ÌÐò¡£Ëü±ØÐë¶Ô³ÌÐò½øÐмǺŻ®·ÖÒÔ·¢ÏÖ±êʶºêµÄ±êʶ·û¡£Ëü±ØÐëͨ¹ý¶Ôÿ¸öºê½øÐÐÇóÖµÀ´Ìæ»»ºêµ÷Óá£×îºó£¬¾­¹ýºêÌæ»»µÄ³ÌÐòÓÖ±»»ã¼¯³É×Ö·ûÁ÷Ë͸ø±àÒëÆ÷¡£±àÒëÆ÷ÔÙµÚ¶þ´Î½«Õâ¸öÁ÷»®·ÖΪ¼ÇºÅ¡£
    ÔÚÕâÒ»½ÚÖУ¬ÎÒÃǽ«Ì½Ë÷¶Ô¼ÇºÅµÄÒâÒåµÄÆÕ±éµÄÎó½âÒÔ¼°¼ÇºÅºÍ×é³ÉËüÃǵÄ×Ö·ûÖ®¼äµÄ¹Øϵ¡£ÉÔºóÎÒÃǽ«Ì¸µ½Ô¤´¦ÀíÆ÷¡£
1.1 = ²»ÊÇ ==
    ´ÓAlgolÅÉÉú³öÀ´µÄÓïÑÔ£¬ÈçPascalºÍAda£¬ÓÃ:=±íʾ¸³Öµ¶øÓÃ=±íÊ


Ïà¹ØÎĵµ£º

C±à³Ì¾«´â

¹æÔò»ò½¨Ò顣ÿÌõ×¼Ôò¶¼ÓÐÀýÍâ
1£¬¼ÙÏëµÄ±àÒë³ÌÐò
ʹÓñàÒë³ÌÐòËùÓеĿÉÑ¡¾¯¸æÉèÊ©
ʹÓÃlintÀ´²é³ö±àÒë³ÌÐò©µôµÄ´íÎó
Èç¹ûÓе¥Ôª²âÊÔ£¬¾Í½øÐе¥Ôª²âÊÔ
2£¬×Ô¼ºÉè¼Æ²¢Ê¹ÓöÏÑÔ
¼ÈҪά»¤³ÌÐòµÄ½»¸¶°æ±¾£¬ÓÖҪά»¤³ÌÐòµÄµ÷ÊÔ°æ±¾
ҪʹÓöÏÑÔ¶Ôº¯Êý²ÎÊý½øÐÐÈ·ÈÏ
Òª´Ó³ÌÐòÖÐɾȥÎÞ¶¨ÒåµÄÌØÐÔ£¬»òÕßÔÚ³ÌÐòÖÐʹÓöÏÑÔÀ´¼ ......

¹ØÓÚC/C++ÖÐÄÚ´æ¿Õ¼äµÄ»®·Ö

CAPTION: ¹ØÓÚC/C++ÖÐÄÚ´æ¿Õ¼äµÄ»®·Ö
AUTHOR: aIsland Õª×ÔÖйúITʵÑéÊÒ
DATE: 2010-05-30
E-MAIL: aIsland@live.cn
QQ: 418662213
P.S.
     1.Bolanlan|ËæÐÄhigh|aIsland Èý¸öÍøÃû¾ùΪ±¾ÈË
     2.ÉùÃ÷aIsland ËùÊÕ¼µÄËùÓÐÎÄÕÂÆäÖø×÷Ȩ¶¼ÊôÓÚÔ­´´×÷Õß
   ......

¡¾Á´½Ó¡¿C/C++ Online Reference


C/C++ Reference 
http://www.cppreference.com/ 
C++ Library Reference 
http://www.cplusplus.com/ref/ 
Standard C++ Library Class Reference at Rogue Wave 
http://www.roguewave.com/support/docs/hppdocs/stdref/ 
Dink ......

C++ÓëCµÄÇø±ð ±±º£

1£©  º¯ÊýÉùÃ÷
l         CÈç¹û²»Ð´·µ»ØÖµ£¬Ä¬ÈÏÊÇint£¬¶øC++Öв»Äܲ»Ð´·µ»ØÖµ(¿ÉÓÃvoid±íʾÎÞ·µ»ØÖµ)¡£
ÈçFunc1();
l         int Func1()ÔÚCÖбíʾ¿É´øÈÎÒâ²ÎÊýµÄº¯Êý£¬ÕâÊÇCµÄ©¶´£¬Ê¹µÃËü±Ü¿ªÁ˲ÎÊýÀàÐͼì²é£»¶øC++Öбíʾ²»´ ......

C/C++Í·ÎļþÒ»ÀÀ


C/C++
Í·ÎļþÒ»ÀÀ

//////////////////////////////////////////////////////////////////////////
C
Í·Îļþ
(C89,C95)
(C++98,C++03Ò²°üº¬)
include <assert.h>¡¡¡¡¡¡¡¡//Õï¶Ï¿â
include <ctype.h>¡¡¡¡¡¡¡¡ //×Ö·û´¦Àíº¯Êý¿â
include <errno.h>¡¡¡¡¡¡¡¡ //´íÎó¶¨Òå
include <float.h& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ