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

cº¯Êý: strtok ºÍ strtok_r

º¯ÊýÃû:   strtok    
  ¹¦     ÄÜ:   ²éÕÒÓÉÔÚµÚ¶þ¸ö´®ÖÐÖ¸¶¨µÄ·Ö½ç·û·Ö¸ô¿ªµÄµ¥´Ê    
  ÓÃ     ·¨:   char   *strtok(char   *str1,   char   *str2);    
  ³ÌÐòÀý:    
   
  #include   <string.h>    
  #include   <stdio.h>    
   
  int   main(void)    
  {    
        char   input[16]   =   "abc,d";    
        char   *p;    
   
        /*   strtok   places   a   NULL   terminator    
        in   front   of   the   token,   if   found   */    
        p   =   strtok(input,   ",");    
        if   (p)       printf("%s\n",   p);    
   
        /*   A   second   call   to   strtok   using   a   NULL    
        as   the   first   parameter   returns   a   pointer    
        to   the   character   following   the   token     */    
        p   =   strtok(NULL,   ",");    
        if   (p)       printf("%s\n",   p);    
        return   0;    
  }   
´øÓÐ_rµÄº¯ÊýÖ÷ÒªÀ´×ÔÓÚUNIXÏÂÃæ¡£ËùÓеĴøÓÐ_rºÍ²»´ø_rµÄº¯ÊýµÄÇø±ðµÄÊÇ:´ø_rµÄº¯ÊýÊÇḬ̈߳²È«µÄ£¬rµÄÒâ˼ÊÇreentrant,¿ÉÖØÈëµÄ¡£
ÉÏÊö³ÌÐòÔËÐеĽá¹ûÊÇ
abc
d
1. strtok½éÉÜ
ÖÚËùÖÜÖª£¬strtok¿ÉÒÔ¸ù¾ÝÓû§ËùÌṩµÄ·Ö¸î·


Ïà¹ØÎĵµ£º

C/C++ѧϰӦ¸Ã×¢ÒâµÄ¼¸¸öϸ½Ú


¸øÎÒÃÇÉÏASP.NETµÄÀÏʦÔÚ½²½âC#µÄʱºò£¬×ÜÊÇҪѯÎÊÎÒÃÇC#ºÍC/C++¼äµÄ²»Í¬Ö®´¦£¬»òÕßһЩϸ½ÚÎÊÌ⣬µ«ÊÇƽʱ²»ÔõôעÒ⣬»¹Õæ°ÑÎÒÃǸøÎʵ½ÁË£¡£¡
Ò».²»¾­¹ýÖмä±äÁ¿ÔõÑù½»»»Á½¸öÊý¾Ý int a=25;b=10;
½â·¨: a=a+b;//35
        b=a-b;//25
      ......

³ÌÐòԱ֮·©¤©¤ÈçºÎѧϰCÓïÑÔ²¢¾«Í¨CÓï


תÔØ×Ô: http://bbs.chinaitlab.com/thread-304041-1-1.html
ѧϰCÓïÑÔ²»ÊÇÒ»³¯Ò»Ï¦µÄÊÂÇ飬µ«Ò²²»ÐèÒª»¨·ÑÊ®Äêʱ¼ä²ÅÄܾ«Í¨¡£ÈçºÎÒÔ×îСµÄ´ú¼Ûѧϰ²¢¾«Í¨CÓïÑÔÊDZ¾ÎĵÄÖ÷Ìâ¡£Çë×¢Ò⣬¼´Ê¹ÊÇ“×îСµÄ´ú¼Û”£¬Ò²¾ø²»ÊÇʲô½Ý¾¶£¬¶øÊÇÒÔ×î¶ÌµÄʱ¼äÈ¡µÃ×î¶àµÄÊÕ»ñ£¬Í¬Ê±Ò²Òâζ×ÅÄãÐèÒª¾­Àú¼è¿àµÄ¹ý³Ì¡£
Ò»¡¢Òª¶Á ......

keil c union ´æ´¢µÄÎÊÌâ

     3: int main()
     4: {
     5:    int i = 1,j;
     6:    union test{
     7:       int m;
     8:  ......

¡¾C\C++ÓïÑÔÈëÃÅƪ¡¿ µ÷ÊÔ»ù´¡

ͨ¹ýÇ°ÃæÁ½Æª£¬ÏàÐÅ´ó¼ÒÒѾ­»ù±¾Á˽âÁËÎÒÃǵÄÑо¿Ë¼Â·¡£¼ÈÈ»ÊÇÑо¿£¬ÄÇô±ØÐëµÄÑо¿¹¤¾ß¾ÍµÃÊìÁ·ÕÆÎÕÁË¡£ÕâÀïÎÒËùÖ¸µÄÑо¿¹¤¾ß¾ÍÊÇVC£¬ÎÒËùʹÓõÄVC°æ±¾ÊÇ2005¡£±¾ÎÄÒ²½«¸ù¾ÝVC2005½øÐÐ̽ÌÖ¡£¿ÉÄܺܶàÅóÓÑ»òÕß³õѧÕß»¹ÊÇʹÓõÄVC6.0¡£ÔÚÕâÀï±¾È˲»ÍƼöʹÓÃVC6.0¡£Ô­ÒòºÜ¼òµ¥£¬VC6.0ÒѾ­¹ýʱÁË£¬ºóÃæµÄ°æ±¾±ÈVC6.0¸üÇ¿´ó·½±ã ......

ANSI C¶ÁÊé±Ê¼ÇϵÁÐÖ®×Ö·û¼¯Æª µÚËÄÕ ×Ö½ÚÐò

"endian"Õâ¸ö´Ê³ö×Ô<<¸ñÁзðÓμÇ>>,СÈ˹úµÄÄÚÕ½¾ÍÔ´ÓÚ³Ô¼¦µ°Ê±ÊǾ¿¾¹´Ó´óÍ·(Big-Endian)Çÿª»¹ÊÇ´ÓСͷ(Little-Endian)Çÿª.ÎÒÃÇÒ»°ã½«endian·­Òë³É"×Ö½ÚÐò",½«big endianºÍlittle endian³Æ×÷"´ó¶Ë"ºÍ"С¶Ë".
ÔÚ¼ÆËã»ú¿ÆѧÁìÓòÖÐ,×Ö½ÚÐòÊÇÖ¸´æ·Å¶à×Ö½ÚÊý¾ÝµÄ×Ö½ÚµÄ˳Ðò,µäÐ͵ÄÇé¿öÊÇÕûÊýÔÚÄÚ´æÖеĴæ·Å·½Ê½ºÍ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ