锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久人爽人人爽人人片AV ,亚洲欧美国产日韩综合久久,久久精品天天中文字幕人妻http://www.shnenglu.com/meglory/category/13998.htmlzh-cnSat, 12 Mar 2011 08:25:25 GMTSat, 12 Mar 2011 08:25:25 GMT60綰︾憻澶幆http://www.shnenglu.com/meglory/archive/2011/03/11/141582.htmlmeglorymegloryFri, 11 Mar 2011 10:55:00 GMThttp://www.shnenglu.com/meglory/archive/2011/03/11/141582.htmlhttp://www.shnenglu.com/meglory/comments/141582.htmlhttp://www.shnenglu.com/meglory/archive/2011/03/11/141582.html#Feedback0http://www.shnenglu.com/meglory/comments/commentRss/141582.htmlhttp://www.shnenglu.com/meglory/services/trackbacks/141582.html
 1 #include<stdio.h>
 2 #include<stdlib.h>
 3 
 4 struct node{
 5     int value;
 6     struct node* next;
 7 };
 8 typedef struct node NODE;
 9 typedef NODE* NODEPTR;
10 
11 int main()
12 {
13     int i;
14     int count;
15     int N,M;
16     NODEPTR head=(NODEPTR)malloc(sizeof(NODE));
17     NODEPTR prePtr=head;
18     NODEPTR currPtr;
19     NODEPTR temp;
20 
21     scanf("%d %d",&N,&M);
22     count=N;
23 
24     for(i=1;i<=N;i++)
25     {
26         currPtr=(NODEPTR)malloc(sizeof(NODE));
27         currPtr->value=i;
28         prePtr->next=currPtr;
29         prePtr=currPtr;
30     }
31 
32     currPtr->next=head->next;
33     currPtr=head->next;
34 
35     while(count--)
36     {
37         for(i=1;i<=M-2;i++)
38             currPtr=currPtr->next;
39 
40         temp=currPtr->next;
41         printf("%d is out\n",temp->value);
42         currPtr->next=temp->next;
43         currPtr=currPtr->next;
44         free(temp);
45     }
46 
47 
48     return 0;
49 }
50 



meglory 2011-03-11 18:55 鍙戣〃璇勮
]]>
鍗遍櫓鐨剉ector::erasehttp://www.shnenglu.com/meglory/archive/2011/03/11/141568.htmlmeglorymegloryFri, 11 Mar 2011 07:41:00 GMThttp://www.shnenglu.com/meglory/archive/2011/03/11/141568.htmlhttp://www.shnenglu.com/meglory/comments/141568.htmlhttp://www.shnenglu.com/meglory/archive/2011/03/11/141568.html#Feedback0http://www.shnenglu.com/meglory/comments/commentRss/141568.htmlhttp://www.shnenglu.com/meglory/services/trackbacks/141568.html 1 #include<iostream>
 2 #include<vector>
 3 using namespace std;
 4 
 5 int main()
 6 {
 7     vector<int> a;
 8     a.push_back(1);
 9     a.push_back(2);
10     a.push_back(3);
11     a.push_back(4);
12     a.push_back(5);
13     
14     vector<int>::iterator pos=a.begin()+2;
15     vector<int>::iterator temp=pos+1;
16     cout<<"temp now is"<<*temp<<endl;
17     
18     a.erase(pos);
19     
20     cout<<"temp now is"<<*temp<<endl;
21     
22     system("pause");
23     return 0;
24 }

浠婂ぉ鍦ㄧ敤STL鍐欑害鐟熷か闂鐨勬椂鍊欙紝鍙戠幇vector鐨勮涓烘繪槸浜х敓璇″紓鐨勭粨鏋滐紝璁╂垜鐧炬濅笉寰楀叾瑙c?br>
鐪嬩笂闈唬鐮侊細
涓涓獀ector閲岄潰鏈?鍒?錛屾誨叡5涓厓绱犮傛妸涓涓凱浠e櫒pos鎸囧悜絎笁涓厓绱?錛屽彟澶栦竴涓猼emp鎸囧悜絎洓涓厓绱?錛岀劧鍚庤皟鐢╡rase鎶婄涓変釜鍏冪礌鎶規帀銆?br>娉ㄦ剰錛屽湪榪欎釜鏃跺欑戶緇В寮曠敤temp鐨勬椂鍊欙紝浼氬彂鐜板畠鎸囧悜鐨勫厓绱犵濂囩殑鍙樻垚浜?銆?br>
闂灝卞鍦╡rase涓婇潰錛屽湪C++ Reference涓婇潰鍐欓亾錛?br>Because vectors keep an array format, erasing on positions other than the vector end also moves all the elements after the segment erased to their new positions, which may not be a method as efficient as erasing in other kinds of sequence containers (deque, list).

This invalidates all iterator and references to elements after position or first.

鍒犻櫎vector涓涓厓绱狅紝瀵艱嚧瀹冨悗闈㈢殑鍏冪礌鍏ㄩ儴縐誨姩鍒版柊鐨勪綅緗紝鎵浠ュ鑷磋繖涓厓绱犱箣鍚庣殑鎵鏈夎凱浠e櫒閮藉け鏁堛?br>

鍦ㄤ嬌鐢ㄤ竴涓嚱鏁板墠搴旇瀵瑰畠鐨勮涓烘湁娓呮鐨勪簡瑙c傝皚璁般?/p>

meglory 2011-03-11 15:41 鍙戣〃璇勮
]]>
printf鐨勮繑鍥炲?/title><link>http://www.shnenglu.com/meglory/archive/2010/12/23/137277.html</link><dc:creator>meglory</dc:creator><author>meglory</author><pubDate>Thu, 23 Dec 2010 03:39:00 GMT</pubDate><guid>http://www.shnenglu.com/meglory/archive/2010/12/23/137277.html</guid><wfw:comment>http://www.shnenglu.com/meglory/comments/137277.html</wfw:comment><comments>http://www.shnenglu.com/meglory/archive/2010/12/23/137277.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/meglory/comments/commentRss/137277.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/meglory/services/trackbacks/137277.html</trackback:ping><description><![CDATA[<div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #008080;"> 1</span> <span style="color: #000000;">#include</span><span style="color: #000000;"><</span><span style="color: #000000;">stdio.h</span><span style="color: #000000;">></span><span style="color: #000000;"><br></span><span style="color: #008080;"> 2</span> <span style="color: #000000;"><br></span><span style="color: #008080;"> 3</span> <span style="color: #000000;"></span><span style="color: #0000ff;">int</span><span style="color: #000000;"> main()<br></span><span style="color: #008080;"> 4</span> <span style="color: #000000;">{<br></span><span style="color: #008080;"> 5</span> <span style="color: #000000;">    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i</span><span style="color: #000000;">=</span><span style="color: #000000;">43</span><span style="color: #000000;">;<br></span><span style="color: #008080;"> 6</span> <span style="color: #000000;">    printf(</span><span style="color: #000000;">"</span><span style="color: #000000;">%d</span><span style="color: #000000;">"</span><span style="color: #000000;">,printf(</span><span style="color: #000000;">"</span><span style="color: #000000;">%d</span><span style="color: #000000;">"</span><span style="color: #000000;">,printf(</span><span style="color: #000000;">"</span><span style="color: #000000;">%d</span><span style="color: #000000;">"</span><span style="color: #000000;">,i)));<br></span><span style="color: #008080;"> 7</span> <span style="color: #000000;">    <br></span><span style="color: #008080;"> 8</span> <span style="color: #000000;">    </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br></span><span style="color: #008080;"> 9</span> <span style="color: #000000;">}<br></span><span style="color: #008080;">10</span> <span style="color: #000000;"><br></span><span style="color: #008080;">11</span> <span style="color: #000000;">榪欐槸涓涓ぞ鍖虹殑楠岃瘉鐮侊紝璁╄緭鍑虹粨鏋滐紝寰堟湁鎰忔濄?br></span><span style="color: #008080;">12</span> <span style="color: #000000;">緇撴灉鏄?321.<br></span><span style="color: #008080;">13</span> <span style="color: #000000;">printf()鐨勮繑鍥炲鹼細On success, the total number of characters written </span><span style="color: #0000ff;">is</span><span style="color: #000000;"> returned.<br></span><span style="color: #008080;">14</span> <span style="color: #000000;">On failure, a negative number </span><span style="color: #0000ff;">is</span><span style="color: #000000;"> returned.</span></div> <br><img src ="http://www.shnenglu.com/meglory/aggbug/137277.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/meglory/" target="_blank">meglory</a> 2010-12-23 11:39 <a href="http://www.shnenglu.com/meglory/archive/2010/12/23/137277.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>C璇█澹版槑鐨勭鍣ㄨВ鐮佺幆http://www.shnenglu.com/meglory/archive/2010/06/09/117507.htmlmeglorymegloryWed, 09 Jun 2010 15:09:00 GMThttp://www.shnenglu.com/meglory/archive/2010/06/09/117507.htmlhttp://www.shnenglu.com/meglory/comments/117507.htmlhttp://www.shnenglu.com/meglory/archive/2010/06/09/117507.html#Feedback0http://www.shnenglu.com/meglory/comments/commentRss/117507.htmlhttp://www.shnenglu.com/meglory/services/trackbacks/117507.html浠婂ぉ鐪嬪埌鏈変綅绔ラ瀷鍦═opLanguage涓婇潰鎻愪簡涓棶棰橈細
int a[][3]={1,2,3,4,5,6};
int (*b)[3]=a;

涓嶇敤緙栬瘧鍣紝璇磋b閲屾槸浠涔堬紵

鍏跺疄榪欑闂鍦ㄣ奀涓撳緙栫▼銆嬬殑P65涓殑紲炲櫒瑙g爜鐜腑鏈夊緢璇﹀敖鐨勮В閲娿?br>鍦ㄨ繖閲岄鍏堣冨療絳夊紡宸﹁竟鐨刬nt (*b)[3]

1.鏈宸﹁竟鐨勬爣璇嗙鏄痓 琛ㄧずb鏄?..
2.b鐨勫乏杈規槸*
琛ㄦ槑b鏄寚鍚?..鐨勬寚閽?br>
3.*鐨勫乏杈規槸宸︽嫭鍙?
宸︽嫭鍙鋒妸宸茬粡澶勭悊鐨勯儴鍒嗗0鏄庣粍鍚堝湪涓璧鳳紝鐭ラ亾閬囪鐩稿簲鐨勫彸鎷彿
4.(*b)宸﹁竟鏄柟鎷彿
琛ㄧず澶у皬涓?鐨勬暟緇?
5.鍓╀笅鐨勭鍙峰艦鎴愬熀鏈被鍨媔nt
琛ㄦ槑b鏄竴涓寚閽堬紝瀹冩寚鍚戜竴涓ぇ灝忎負3鐨刬nt鍨嬫暟緇勩?

鑰屾妸a鐨勫艱祴緇檅錛岃〃鏄庢槸灝哹鎸囧悜a銆?br>
涔嬪悗sagasw緇欏嚭涓涓猟emo,鍙互鏇存竻妤氱殑浜嗚В鎸囬拡鐩稿叧鍚勭銆?br>
int main(int argc, char* argv[])
{

    
int a[][3]={1,2,3,4,5,6};
    
int (*b)[3]=a;   
    printf(
"a %p b %p \n", a, b);

    
++b;
    printf(
"a1 %p a10 %p a11 %p b %p \n", a[1], &a[1][0], &a[1][1], b);

    
++b;
    printf(
"a %p b %p \n", a[2], b);
    
return 0;

}



meglory 2010-06-09 23:09 鍙戣〃璇勮
]]>
C++杈撳嚭姹夊瓧http://www.shnenglu.com/meglory/archive/2010/05/12/115228.htmlmeglorymegloryWed, 12 May 2010 13:45:00 GMThttp://www.shnenglu.com/meglory/archive/2010/05/12/115228.htmlhttp://www.shnenglu.com/meglory/comments/115228.htmlhttp://www.shnenglu.com/meglory/archive/2010/05/12/115228.html#Feedback0http://www.shnenglu.com/meglory/comments/commentRss/115228.htmlhttp://www.shnenglu.com/meglory/services/trackbacks/115228.html//杈撳嚭姹夊瓧
char temp[3];
char c;

temp[
0]=getchar();
temp[
1]=getchar();
temp[
2]='\0';
    
cout
<<temp<<endl;


meglory 2010-05-12 21:45 鍙戣〃璇勮
]]>
国产精品久久久久久影院| 久久人人爽人人爽AV片| 亚洲国产精品18久久久久久| 伊人色综合久久天天人手人婷| 天天躁日日躁狠狠久久| 99久久国产亚洲高清观看2024 | 91性高湖久久久久| 理论片午午伦夜理片久久 | 少妇久久久久久被弄到高潮| 久久这里有精品| 77777亚洲午夜久久多喷| 久久久久成人精品无码| 久久亚洲精品成人av无码网站| 久久久精品免费国产四虎| 一本一本久久A久久综合精品| 色成年激情久久综合| 亚洲精品乱码久久久久久蜜桃不卡 | 欧美性猛交xxxx免费看久久久| 久久香综合精品久久伊人| 日韩十八禁一区二区久久| 精品乱码久久久久久久| 女人高潮久久久叫人喷水| 狠狠人妻久久久久久综合蜜桃 | 久久亚洲精品无码观看不卡| 97精品久久天干天天天按摩| 久久久久久久波多野结衣高潮| 91精品观看91久久久久久| 国产成人精品久久免费动漫| 亚洲av伊人久久综合密臀性色| 亚洲精品美女久久久久99小说| 香港aa三级久久三级| 狠狠色婷婷综合天天久久丁香| 综合人妻久久一区二区精品| 精品伊人久久久| 久久精品人人做人人爽电影| 久久午夜无码鲁丝片午夜精品| 国产99久久久国产精免费| 99精品久久久久久久婷婷| 精品无码久久久久久国产| 久久99国产一区二区三区| 久久久99精品成人片中文字幕|