锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久人爽人人爽人人片AV ,亚洲欧美国产日韩综合久久,久久精品天天中文字幕人妻http://m.shnenglu.com/meglory/category/13998.htmlzh-cnSat, 12 Mar 2011 08:25:25 GMTSat, 12 Mar 2011 08:25:25 GMT60綰︾憻澶幆http://m.shnenglu.com/meglory/archive/2011/03/11/141582.htmlmeglorymegloryFri, 11 Mar 2011 10:55:00 GMThttp://m.shnenglu.com/meglory/archive/2011/03/11/141582.htmlhttp://m.shnenglu.com/meglory/comments/141582.htmlhttp://m.shnenglu.com/meglory/archive/2011/03/11/141582.html#Feedback0http://m.shnenglu.com/meglory/comments/commentRss/141582.htmlhttp://m.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://m.shnenglu.com/meglory/archive/2011/03/11/141568.htmlmeglorymegloryFri, 11 Mar 2011 07:41:00 GMThttp://m.shnenglu.com/meglory/archive/2011/03/11/141568.htmlhttp://m.shnenglu.com/meglory/comments/141568.htmlhttp://m.shnenglu.com/meglory/archive/2011/03/11/141568.html#Feedback0http://m.shnenglu.com/meglory/comments/commentRss/141568.htmlhttp://m.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://m.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://m.shnenglu.com/meglory/archive/2010/12/23/137277.html</guid><wfw:comment>http://m.shnenglu.com/meglory/comments/137277.html</wfw:comment><comments>http://m.shnenglu.com/meglory/archive/2010/12/23/137277.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/meglory/comments/commentRss/137277.html</wfw:commentRss><trackback:ping>http://m.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://m.shnenglu.com/meglory/aggbug/137277.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/meglory/" target="_blank">meglory</a> 2010-12-23 11:39 <a href="http://m.shnenglu.com/meglory/archive/2010/12/23/137277.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>C璇█澹版槑鐨勭鍣ㄨВ鐮佺幆http://m.shnenglu.com/meglory/archive/2010/06/09/117507.htmlmeglorymegloryWed, 09 Jun 2010 15:09:00 GMThttp://m.shnenglu.com/meglory/archive/2010/06/09/117507.htmlhttp://m.shnenglu.com/meglory/comments/117507.htmlhttp://m.shnenglu.com/meglory/archive/2010/06/09/117507.html#Feedback0http://m.shnenglu.com/meglory/comments/commentRss/117507.htmlhttp://m.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://m.shnenglu.com/meglory/archive/2010/05/12/115228.htmlmeglorymegloryWed, 12 May 2010 13:45:00 GMThttp://m.shnenglu.com/meglory/archive/2010/05/12/115228.htmlhttp://m.shnenglu.com/meglory/comments/115228.htmlhttp://m.shnenglu.com/meglory/archive/2010/05/12/115228.html#Feedback0http://m.shnenglu.com/meglory/comments/commentRss/115228.htmlhttp://m.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 鍙戣〃璇勮
]]>
久久久91人妻无码精品蜜桃HD | 日本WV一本一道久久香蕉| 色综合久久综精品| 久久国产香蕉一区精品| 久久精品一区二区三区中文字幕| 久久久久久A亚洲欧洲AV冫| 久久久久久久久久久| 久久亚洲精品无码AV红樱桃| 999久久久免费国产精品播放| 久久免费观看视频| 国产成人久久精品激情| 九九热久久免费视频| 麻豆久久| 久久久久亚洲av无码专区喷水| 青春久久| 中文字幕精品久久| 亚洲欧美成人久久综合中文网| 久久93精品国产91久久综合| 无码精品久久久天天影视| 久久中文精品无码中文字幕| 婷婷久久综合九色综合98| aaa级精品久久久国产片| 思思久久好好热精品国产| 久久婷婷五月综合97色| 久久久久国产一区二区三区| 一级做a爰片久久毛片毛片| 国产综合久久久久| 久久人人爽人人人人片av| 欧美久久久久久精选9999| 久久久精品免费国产四虎| 午夜欧美精品久久久久久久 | 亚洲综合久久久| 国产午夜精品久久久久九九电影 | 亚洲精品乱码久久久久久久久久久久 | 久久综合狠狠色综合伊人| 热re99久久6国产精品免费| 久久久中文字幕| 久久国产免费| 精品久久久久中文字幕日本 | 嫩草影院久久99| 国产精品18久久久久久vr|