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

[C]CÓïÑÔ»ù´¡¹®¹ÌרÌâ Á´±íÖ®£¨Á´±í·´×ª£©

 Á´±íÊÇcÓïÑÔÖкÜÖØÒªµÄÊý¾Ý½á¹¹£¬ÊÇ¿¼²ìÒ»¸ö³ÌÐòÔ±µÄ»ù±¾¹¦µÄÊֶΣ¬Ö®Ç°ÔÚÒ»¼Ò¹«Ë¾ÃæÊÔʱ¾ÍÎʵ½ÁË
ʵÏÖÒ»¸öÁ´±íµÄ·´×ª£¬µ±Ê±¾ÍÊÇûÓкܺÃÀä¾²µÄ˼¿¼£¬½ñÌìÔÚÕâÀïд³öÀ´£¬¹²Ã㣡
 »ù±¾Ëã·¨£º
       1. ÅжÏÊÇ·ñΪ¿Õ£¬Èç¹ûΪ¿Õ£¬·µ»ØNULL
       2. ·ñÔò˵Ã÷ÖÁÉÙÓÐÒ»¸ö½Úµã£¬ÄÇô
             p2Ö¸Ïò×îºóÒ»¸ö½Úµã£¬p1Ö¸ÏòÇ°Ò»¸ö½Úµã£¬
            °Ñp2Ö¸ÏòµÄ½ÚµãµÄnext ÖÃΪNULL(ÒòΪÕâ¸öµã½«ÊÇÁ´±íµÄĩβ½Úµã)
           
      3. ½øÈëÑ­»·
              1£©ÈÃÇ°Ò»¸ö½ÚµãºÍºóÒ»¸ö½ÚµãÖØн¨Á¢Á¬½Ó£»
              2£©P2 ÍùÇ°ÒÆ£¬p2=p1;
              3£©P1 ÍùÇ°ÒÆ£¬p1=p1->next¡£
          ºóÁ½²½ÊÇΪÏÂÒ»¸öÑ­»·×ö×¼±¸¡£
      4. µ±p1Ϊ¿Õʱ£¬p2Ö¸ÏòµÄÊÇ×îºóÒ»¸ö½Úµã£¬ÄÇô·µ»Øp2.
»ù±¾´úÂëÈçÏ£º
struct Node
{
int num;
Node * next;
};
Node * reverse(Node * head)
{
if(head==NULL)
{
return NULL;
}
Node * p1,p2;
p2=head;
p1=head->next;
p2->next=NULL;
while(p1)
{
p1->next=p2;
p2=p1;
p1=p1->next;
}
return p2;
}


Ïà¹ØÎĵµ£º

cº¯Êý: strtok ºÍ strtok_r

º¯ÊýÃû:   strtok    
  ¹¦     ÄÜ:   ²éÕÒÓÉÔÚµÚ¶þ¸ö´®ÖÐÖ¸¶¨µÄ·Ö½ç·û·Ö¸ô¿ªµÄµ¥´Ê    
  ÓÃ     ·¨:   char   *strtok(char   *str1,   char   *str2);    
  ³ÌÐòÀý:    
   
&nbs ......

c/c++ ºó׺ÃûÏê½â


.APS£º´æ·Å¶þ½øÖÆ×ÊÔ´µÄÖмäÎļþ£¬VC°Ñµ±Ç°×ÊÔ´Îļþת»»³É¶þ½øÖƸñʽ£¬²¢´æ·ÅÔÚAPSÎļþÖУ¬ÒÔ¼Ó¿ì×ÊÔ´×°ÔØËٶȡ£×ÊÔ´¸¨ÖúÎļþ¡£
.BMP£ºÎ»Í¼×ÊÔ´Îļþ¡£
.BSC£ºä¯ÀÀÐÅÏ¢Îļþ£¬ÓÉä¯ÀÀÐÅϢά»¤¹¤¾ß£¨BSCMAKE£©´Óԭʼä¯ÀÀÐÅÏ¢Îļþ£¨.SBR£©ÖÐÉú³É£¬BSCÎļþ¿ÉÒÔÓÃÀ´ÔÚÔ´´úÂë±à¼­´°¿ÚÖнøÐпìËÙ¶¨Î»¡£ÓÃÓÚä¯ÀÀÏîÄ¿ÐÅÏ¢µÄ£¬Èç¹ûÓ ......

jstl±êÇ©: c:ForeachÏê½â

 
Ϊѭ»·¿ØÖÆ£¬Ëü¿ÉÒÔ½«¼¯ºÏ(Collection)ÖеijÉԱѭÐòä¯ÀÀÒ»±é¡£ÔË×÷·½Ê½Îªµ±Ìõ¼þ·ûºÏʱ£¬¾Í»á³ÖÐøÖظ´Ö´Ðеı¾ÌåÄÚÈÝ¡£
¡¡¡¡ Ϊѭ»·¿ØÖÆ£¬Ëü¿ÉÒÔ½«¼¯ºÏ(Collection)ÖеijÉԱѭÐòä¯ÀÀÒ»±é¡£ÔË×÷·½Ê½Îªµ±Ìõ¼þ·ûºÏʱ£¬¾Í»á³ÖÐøÖظ´Ö´Ðеı¾ÌåÄÚÈÝ¡£
¡¡¡¡Óï·¨
¡¡¡¡Óï·¨1£ºµü´úÒ»¼¯ºÏ¶ÔÏóÖ®ËùÓгÉÔ±
¡¡¡¡<c:forEac ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ