C/C++ ϱêÓÐЧÐÔ¼ì²é
C/C++ÊDz»¼ì²éÊý×éϱêÊÇ·ñÔ½½çµÄ¡£
²»¼ì²éϱêÊÇ·ñÔ½½ç¿ÉÒÔÓÐЧÌá¸ß³ÌÐòÔËÐеÄЧÂÊ£¬ÒòΪÈç¹ûÄã¼ì²é£¬ÄÇô±àÒëÆ÷±ØÐëÔÚÉú³ÉµÄÄ¿±ê´úÂëÖмÓÈë¶îÍâµÄ´úÂëÓÃÓÚ³ÌÐòÔËÐÐʱ¼ì²âϱêÊÇ·ñÔ½½ç£¬Õâ¾Í»áµ¼Ö³ÌÐòµÄÔËÐÐËÙ¶ÈϽµ£¬ËùÒÔΪÁ˳ÌÐòµÄÔËÐÐЧÂÊ£¬C/C++²Å²»¼ì²éϱêÊÇ·ñÔ½½ç¡£
C/C++Èç¹ûÊý×éϱêÔ½½çÁË£¬ÄÇôËü»á×Ô¶¯½Ó×ÅÄÇ¿éÄÚ´æÍùºóд¡£ÏëÁËÒ»ÏÂÃ÷°×ÁË£¬ÒÔǰ˵²»ÔÊÐíÊý×éϱêÔ½½ç£¬²¢²»ÊÇÒòΪ½çÍâûÓд洢¿Õ¼ä£¬¶øÊÇÒòΪ½çÍâµÄÄÚÈÝÊÇδ֪µÄ¡£Ò²¾ÍÊÇ˵Èç¹û½çÍâµÄ¿Õ¼äÔÝʱûÓб»ÀûÓã¬ÄÇôÎÒÃÇ¿ÉÒÔÕ¼ÓÃÄÇ¿éÄڴ棬µ«ÊÇÈç¹û֮ǰ½çÍâµÄÄÚ´æÒѾ´æ·ÅÁ˶«Î÷£¬ÄÇôÎÒÃÇÔ½½ç¹ýÈ¥¾Í»á¸²¸ÇÄÇ¿éÄڴ棬µ¼Ö´íÎóµÄ²úÉú¡£¡£¡£
Ïà¹ØÎĵµ£º
// ·½°¸— Óŵ㣺½öʹÓÃC ±ê×¼¿â£»È±µã£ºÖ»Äܾ«È·µ½Ãë¼¶
#include <time.h>
#include <stdio.h>
int main( void )
{
time_t t = time(0);
char tmp[64];
strftime( tmp, sizeof(tmp), "%Y/%m/%d %X %A ±¾ÄêµÚ%jÌì %z",localtim ......
7.2.1 ½éÉÜgetchar()ºÍputchar()
Ç°ÃæµÄ¶àÊý³ÌÐòËùÊäÈëµÄÄÚÈݶ¼ÊÇÊý×Ö¡£ÎªÁËÁ·Ï°Ê¹ÓÃÆäËûµÄÐÎʽ£¬ÈÃÎÒÃÇÀ´¿´Ò»¸öÃæÏò×Ö·ûµÄÀý×Ó¡£
ÏÖÔÚÎÒÃǽ«½Ó´¥×¨ÃÅÎªÃæÏò×Ö·ûI/O¶øÉè¼ÆµÄÒ»¶ÔCº¯Êý£ºgetchar()ºÍputchar()¡£
.
getchar()º¯ÊýûÓвÎÊý£¬Ëü·µ»ØÀ´×ÔÊäÈëÉ豸µÄÏÂÒ»¸ö×Ö·û¡£ÀýÈ磬ÏÂÃæµÄÓï¾ä¶ÁÈ¡ÏÂÒ»¸öÊäÈë×Ö·û²¢½«ËüµÄÖµ ......
ΪÁËʹÓÃCÓïÑÔ±à³ÌÖ±½Ó¶ÁÈ¡dbfÎļþ£¬ÐèÒªÁ˽âdbfÎļþµÄ¶þ½øÖÆÎļþ¸ñʽ£¬ÏÂÃæ¸ø³ö¼òÒªµÄ˵Ã÷¡£
±íÎļþÓÉÍ·¼Ç¼¼°Êý¾Ý¼Ç¼×é³É¡£Í·¼Ç¼¶¨Òå¸Ã±íµÄ½á¹¹²¢°üº¬Óë±íÏà¹ØµÄÆäËûÐÅÏ¢¡£Í·¼Ç¼ÓÉÎļþλÖà 0 ¿ªÊ¼¡£Êý¾Ý¼Ç¼1½ô½ÓÔÚÍ·¼Ç¼֮ºó£¨Á¬ÐøµÄ×Ö½Ú£©£¬°üº¬×Ö¶ÎÖÐʵ¼ÊµÄÎı¾¡£
¼Ç¼µÄ³¤¶È£¨ÒÔ×Ö½ÚΪµ¥Î»£©µÈÓÚËùÓÐ×ֶζ¨Òå ......
ÍøÓѹ۵ã:
(Ò»):
ÎÒÈÏΪºÜ¶àÈËûÓÐÀí½âlinus»òÕßmyanµÄÒâ˼£¬ÎÒ¾Ù¸öʵÀý¡£
ÎÒÃÇÏÖÔÚÒªÉè¼ÆÒ»Ì×ÍøÂ磿ͻ§¶ËÈí¼þ£¬ÎÒÃÇÒªÏȰÑÐÒ鶨ºÃ£¬°Ñ½çÃæºÍºǫ́½»»¥Éè¼ÆÏëºÃ£¬°ÑÈÝ´íºÍ»Ö¸´ÏëºÃ£¬ÎÒÈÏΪÕâЩÊÇ×îÖØÒªµÄ£¬ÖÁÓÚ±àÂ룬ÓÃCÒ²¿ÉÒÔ±à³öÀ´£¬ÓÃC£«£«Ò²¿ÉÒÔ±à³öÀ´£¬ÉõÖÁÓÃJAVAÒ²Äܱà³öÀ´£¬¹Ø¼üÊÇÕû¸öÈí¼þµÄ¼Ü¹¹ÒªÇåÎú£¬Õ ......