锘??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩一级免费,久久激情五月激情,狠狠色狠狠色综合日日小说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| 7777精品久久久大香线蕉| 久久精品国产一区二区三区| 亚洲一级Av无码毛片久久精品| 狠狠色丁香婷婷久久综合| 久久精品人人做人人爽97 | 精品久久人人妻人人做精品| 色诱久久av| 国产成人综合久久精品尤物| 色婷婷综合久久久久中文一区二区 | 亚洲精品高清国产一久久| 欧美粉嫩小泬久久久久久久 | 91性高湖久久久久| 久久综合久久自在自线精品自| 国产精自产拍久久久久久蜜| 久久99精品久久久久久hb无码| 亚洲欧美久久久久9999| 久久精品国产一区二区电影| 热久久国产精品| 青青草国产成人久久91网| 国产欧美久久一区二区| 亚洲va久久久噜噜噜久久男同| 手机看片久久高清国产日韩 | 久久久无码人妻精品无码| 久久天天躁夜夜躁狠狠| 国产成人久久精品二区三区| 国内精品久久久久影院日本| 思思久久好好热精品国产| 精品视频久久久久| 国产福利电影一区二区三区,免费久久久久久久精 | 久久精品国产99国产精品导航| 久久激情五月丁香伊人| 精品久久综合1区2区3区激情| 日本精品久久久中文字幕| 国产精品美女久久久久网| 久久久久综合网久久| 亚洲一区中文字幕久久| 久久久久久久久久久免费精品| 国产精品成人无码久久久久久| 精品视频久久久久| 久久99热这里只有精品66|