CRT (C run time library)
Ò» ²úÉú ÔËÐÐʱ¿âÊdzÌÐòÔÚÔËÐÐʱËùÐèÒªµÄ¿âÎļþ£¬Í¨³£ÒÔLIB»òDLLÐÎʽÌṩ¡£ CÔËÐÐʱ¿â¾ÍÊÇC run-time library£¬µ®ÉúÓÚ20ÊÀ¼Í70Äê´ú£¬ÊÇC¶ø·ÇC++ÓïÑÔÊÀ½çµÄ¸ÅÄC³ÌÐòÔËÐÐʱÐèÒªÕâЩ¿âÖеĺ¯Êý¡£ C ÓïÑÔÊÇËùνµÄ¡°Ð¡Äںˡ±ÓïÑÔ£¬¾ÍÆäÓïÑÔ±¾ÉíÀ´ËµºÜС£¨²»¶àµÄ¹Ø¼ü×Ö£¬³ÌÐòÁ÷³Ì¿ØÖÆ£¬Êý¾ÝÀàÐ͵ȣ©¡£ËùÒÔ£¬CÓïÑÔÄں˿ª·¢³öÀ´Ö®ºó£¬Dennis RitchieºÍBrian Kernighan¾ÍÓÃC±¾ÉíÖØдÁË90%ÒÔÉϵÄUNIXϵͳº¯Êý£¬²¢ÇÒ°ÑÆäÖÐ×î³£ÓõIJ¿·Ö¶ÀÁ¢³öÀ´£¬ÐγÉÍ·ÎļþºÍ¶ÔÓ¦µÄLIBRARY£¬CÔËÐÐʱ¿â¾ÍÊÇÕâÑùÐγɵġ£ Ëæ×ÅCÓïÑÔµÄÁ÷ÐУ¬¸÷¸öC±àÒëÆ÷µÄÉú²úÉÌ/¸öÌå/ÍÅÌ嶼×ñÑÀϵĴ«Í³£¬ÔÚ²»Í¬Æ½Ì¨É϶¼ÓÐÏà¶ÔÓ¦µÄStandard Library£¬µ«´ó²¿·ÖʵÏÖ¶¼ÊÇÓë¸÷¸öƽ̨Óйصġ£ÓÉÓÚ¸÷¸öC±àÒëÆ÷¶ÔCµÄÖ§³ÖºÍÀí½âÓкܶà·ÖÆçºÍ΢ÃîµÄ²î±ð£¬ËùÒÔ¾ÍÓÐÁËANSI C£»ANSI C£¨Ö÷¹ÛÒâͼÉÏ£©ÏêϸµÄ¹æ¶¨ÁËCÓïÑÔ¸÷¸öÒªËصľßÌ庬ÒåºÍ±àÒëÆ÷ʵÏÖÒªÇó£¬Òý½øÁËеĺ¯ÊýÉùÃ÷·½Ê½£¬Í¬Ê±¶©Á¢ÁËStandard LibraryµÄ±ê×¼ÐÎʽ¡£ËùÒÔCÔËÐÐʱ¿âÓɱàÒëÆ÷Éú²úÉÌÌṩ¡£ÖÁÓÚÓÉÆäËû³§ÉÌ/¸öÈË/ÍÅÌåÌṩµÄÍ·ÎļþºÍ¿âº¯Êý£¬Ó¦µ±³ÆΪµÚÈý·½CÔËÐп⣨Third party C run-time libraries£©¡£ ¶þ ·¢Õ¹ µ½ÁË C++ ÊÀ½çÀÓÐÁíÍâÒ»¸ö¸ÅÄî:Standard C++ Library,Ëü°üÀ¨ÁËÉÏÃæËù˵µÄ C run-time library ºÍ STL¡£°üº¬ C run-time library µÄÔÒòºÜÃ÷ÏÔ£¬C++ ÊÇ C µÄ³¬¼¯£¬Ã»ÓÐÀíÓÉÔÙÖØÐÂÀ´Ò»¸ö C++ run-time library. VCÕë¶ÔC++ ¼ÓÈëµÄStandard C++ LibraryÖ÷Òª°üÀ¨£ºLIBCP.LIB, LIBCPMT.LIBºÍ MSVCPRT.LIB CÔËÐпâ¸Õµ®ÉúµÄʱºò£¬³ÌÐòÊÀ½ç»¹ºÜµ¥´¿£¬Ó¦ÓóÌÐò¶¼Êǵ¥Ï̵߳ģ¬¶àÈÎÎñ»ò¶àÏ̻߳úÖÆÔÚ´Ëʱ»¹ÊôÓÚйÛÄî¡£ËùÒÔÕâ¸öʱÆÚµÄCÔËÐÐʱ¿â¶¼Êǵ¥Ï̵߳ġ£ Ëæ×ŲÙ×÷ϵͳ¶àÏ̼߳¼ÊõµÄ·¢Õ¹£¬×î³õµÄCÔËÐÐʱ¿âÎÞ·¨Âú×ã³ÌÐòµÄÐèÇ󣬳öÏÖÁËÑÏÖصÄÎÊÌâ¡£CÔËÐÐʱ¿âʹÓÃÁ˶à¸öÈ«¾Ö±äÁ¿£¨ÀýÈçerrno£©ºÍ¾²Ì¬±äÁ¿£¬Õâ¿ÉÄÜÔÚ¶àÏ̳߳ÌÐòÖÐÒýÆð³åÍ»¡£¼ÙÉèÁ½¸öÏ̶߳¼Í¬Ê±ÉèÖÃerrno£¬Æä½á¹ûÊǺóÉèÖõÄerrno»á½«ÏÈÇ°µÄ¸²¸Ç£¬Óû§µÃ²»µ½ÕýÈ·µÄ´íÎóÐÅÏ¢¡£ Òò´Ë£¬Visual C++ÌṩÁËÁ½ÖÖ°æ±¾µÄCÔËÐÐʱ¿â¡£Ò»¸ö°æ±¾¹©µ¥Ïß³ÌÓ¦ÓóÌÐòµ÷Óã¬ÁíÒ»¸ö°æ±¾¹©¶àÏß³ÌÓ¦ÓóÌÐòµ÷Ó᣶àÏß³ÌÔËÐÐʱ¿âÓëµ¥Ïß³ÌÔËÐÐʱ¿âÓÐÁ½¸öÖØ´ó²î±ð£º £¨1£©ÀàËÆerrnoµÄÈ«¾Ö±äÁ¿£¬Ã¿¸öÏ̵߳¥¶ÀÉèÖÃÒ»¸ö¡£ÕâÑù´Óÿ¸öÏß³ÌÖпÉÒÔ»ñÈ¡ÕýÈ·µÄ´íÎóÐÅÏ¢¡£ £¨2£©¶àÏ߳̿âÖеÄÊý¾Ý½á¹¹ÒÔͬ²½»úÖƼÓÒÔ±£»¤¡£ ÕâÑù¿ÉÒÔ±ÜÃâ·ÃÎÊʱºòµÄ³åÍ»¡£ Visual C++ÌṩµÄ¶àÏß³
Ïà¹ØÎĵµ£º
Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸еģ¬»î»î»î£¡
&n ......
ÌâÄ¿£ºÊäÈëÒ»ÐÐ×Ö·û£¬·Ö±ðͳ¼Æ³öÆäÖÐÓ¢ÎÄ×Öĸ¡¢¿Õ¸ñ¡¢Êý×ÖºÍÆäËü×Ö·ûµÄ¸öÊý¡£
1.³ÌÐò·ÖÎö£ºÀûÓÃwhileÓï¾ä,Ìõ¼þΪÊäÈëµÄ×Ö·û²»Îª'\n'.
¡¡¡¡¡¡¡¡¡¡¡¡
2.³ÌÐòÔ´´úÂ룺
#include "stdio.h"
main()
{char c;
¡¡int letters=0,space=0,digit=0,others=0;
......
cÎļþ²Ù×÷º¯Êý
clearerr£¨Çå³ýÎļþÁ÷µÄ´íÎóÆì±ê£©
Ïà¹Øº¯Êý feof
±íÍ·Îļþ #include
¶¨Ò庯Êý void clearerr(FILE * stream);
º¯Êý˵Ã÷ clearerr£¨£©Çå³ý²ÎÊýstreamÖ¸¶¨µÄÎļþÁ÷ËùʹÓõĴíÎóÆì±ê¡£
·µ»ØÖµ
fclose£¨¹Ø±ÕÎļþ£© ......
ÎҼƻ®µÄѧϰÀú³Ì£º
1. cºÍc++µÄ»ù´¡ÖªÊ¶£¬Õâ¸öºÍ²Ù×÷ϵͳÎ޹أ¬ÔÚwindowsÉÏÒ²¿ÉÒÔѧ¡£cÓïÑÔÓï·¨Ïà¶Ô¼òµ¥Ò»µã£¬c++²»ÐèÒª°ÑËùÓеÄ֪ʶµã¶¼Ñ§»á£¬ÒªÖªµÀ»ù±¾µÄ·â×°£¬¼Ì³Ð£¬¶à̬֮ÀàµÄ£¬»¹ÓÐSTL¡£¸üÉîÈëµÄѧϰӦ¸ÃÊÇÔÚÒÔºóµÄ¹¤×÷ÖÐÓöµ½ÎÊÌâÁËÔÙÈ¥²é×ÊÁÏ¡£
2. ¿´Ê顶APUE¡·£¬×öÊéÉϵÄÏ°Ì⣬ÕÆÎÕÎļþ£¬ÏµÍ³µ÷Óã¬Ï̡߳¢½ø³Ì¡¢ ......
ÕâÖÖÐèÇóÓ¦¸Ã¾ÍûC++³ÌÐòµ÷ÓÃCº¯ÊýÐèÇó¶àÁË.Ä¿Ç°µÄʵÏÖ»ù±¾Ö»ÓÐÒ»Àà·½·¨,¼´Í¨¹ý´¦Àí±»µ÷ÓõÄC++Îļþ.
ÎÄ
Öиø³öµÄÈÔÈ»ÊÇÍêÕûµÄ,¾ßÌåµÄ,µ«ÓÖ×î»ù±¾×î¼òµ¥µÄʵÏÖ,ÖÁÓÚÀíÂÛÐԵĶ«Î÷ÔÚÍøÉϺÜÈÝÒ×ËÑË÷µÄµ½.ÕâÀïÊÇÕë¶Ôµ÷ÓÃC++µÄ³ÉÔ±º¯ÊýµÄʵÏÖ.
aa.h
class AA {
int i;
public:
& ......