锘??xml version="1.0" encoding="utf-8" standalone="yes"?>97久久婷婷五月综合色d啪蜜芽,人人狠狠综合久久亚洲高清,久久不见久久见免费影院www日本http://www.shnenglu.com/apollo/category/1248.html銆銆鐖辮繃鐭ユ儏閲嶉唹榪囩煡閰掓祿 銆銆鑺卞紑鑺辮阿緇堟槸絀? 銆銆緙樹喚涓嶅仠鐣欏儚鏄ラ鏉ュ張璧? 銆銆濂充漢濡傝姳鑺變技姊?/description>zh-cnTue, 20 May 2008 07:22:39 GMTTue, 20 May 2008 07:22:39 GMT60榪戞棩澶嶄範(fàn)璁板綍http://www.shnenglu.com/apollo/archive/2006/06/28/9118.html絎戠瑧鐢?/dc:creator>絎戠瑧鐢?/author>Wed, 28 Jun 2006 08:12:00 GMThttp://www.shnenglu.com/apollo/archive/2006/06/28/9118.htmlhttp://www.shnenglu.com/apollo/comments/9118.htmlhttp://www.shnenglu.com/apollo/archive/2006/06/28/9118.html#Feedback1http://www.shnenglu.com/apollo/comments/commentRss/9118.htmlhttp://www.shnenglu.com/apollo/services/trackbacks/9118.html1.浣跨敤max/min鏃跺彲浠ョ粰涓涓瘮杈冨嚱鏁版寚閽堛?br />#include <algorithm>
using namespace std;

/* function that compares two pointers by comparing the values to which they point
聽*/
bool int_ptr_less (int* a, int* b)
{
聽聽聽 return *a < *b;
}

int main()
{
聽聽聽 int x = 17;
聽聽聽 int y = 42;
聽聽聽 int* px = &x;
聽聽聽 int* py = &y;
聽聽聽 int* pmax;

聽聽聽 // call max() with special comparison function
聽聽聽 pmax = max (px, py, int_ptr_less);
聽聽聽 //...
}
榪欐槸婧愪唬鐮?MSVC7):
template<class _Ty,
聽class _Pr> inline
聽const _Ty& _MAX(const _Ty& _Left, const _Ty& _Right, _Pr _Pred)
聽{聽// return larger of _Left and _Right using _Pred
聽return (_Pred(_Left, _Right) ? _Right : _Left);
聽}

2.璁劇疆boolalpha鍙互璁╂祦杈撳嚭bool鍊肩殑瀛楃涓插艦寮?/p>

聽cout << boolalpha ;
聽bool b = true;
聽cout << b <<"*********"<<!b << endl;
緇撴灉:
true*********false
3銆備竴涓嬩唬鐮佸彲浠ユ祴璇曚綘鐨勭郴緇熷悇綾誨瀷鐨勮寖鍥?br />#include <iostream>
#include <limits>
#include <string>
using namespace std;

int main()
{
聽聽 // use textual representation for bool
聽聽 cout << boolalpha;

聽聽 // print maximum of integral types
聽聽 cout << "max(short): " << numeric_limits<short>::max() << endl;
聽聽 cout << "max(int):聽聽 " << numeric_limits<int>::max() << endl;
聽聽 cout << "max(long):聽 " << numeric_limits<long>::max() << endl;
聽聽 cout << endl;

聽聽 // print maximum of floating-point types
聽聽 cout << "max(float):聽聽聽聽聽聽 "
聽聽聽聽聽聽聽 << numeric_limits<float>::max() << endl;
聽聽 cout << "max(double):聽聽聽聽聽 "
聽聽聽聽聽聽聽 << numeric_limits<double>::max() << endl;
聽聽 cout << "max(long double): "
聽聽聽聽聽聽聽 << numeric_limits<long double>::max() << endl;
聽聽 cout << endl;

聽聽 // print whether char is signed
聽聽 cout << "is_signed(char): "
聽聽聽聽聽聽聽 << numeric_limits<char>::is_signed << endl;
聽聽 cout << endl;

聽聽 // print whether numeric limits for type string exist
聽聽 cout << "is_specialized(string): "
聽聽聽聽聽聽聽 << numeric_limits<string>::is_specialized << endl;
}



]]>
浠庤緭鍏ユ祦涓鍏ヤ竴琛?/title><link>http://www.shnenglu.com/apollo/archive/2006/04/24/6152.html</link><dc:creator>絎戠瑧鐢?/dc:creator><author>絎戠瑧鐢?/author><pubDate>Mon, 24 Apr 2006 04:13:00 GMT</pubDate><guid>http://www.shnenglu.com/apollo/archive/2006/04/24/6152.html</guid><wfw:comment>http://www.shnenglu.com/apollo/comments/6152.html</wfw:comment><comments>http://www.shnenglu.com/apollo/archive/2006/04/24/6152.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/apollo/comments/commentRss/6152.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/apollo/services/trackbacks/6152.html</trackback:ping><description><![CDATA[涓鐩存病鎵懼埌鎬庝箞璁ヽin涓鍙栦竴琛岃緭鍏ョ殑鍋氭硶錛屼粖澶╃湅<<the c++ programming language>>錛屽叾涓竴涓緥瀛愪腑瑕佽繖鏍風(fēng)殑涓涓嚱鏁癵etline(杈撳叆嫻?鎺ユ敹鍙橀噺):<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 128);">1</span><span style="color: rgb(0, 0, 0);">void f()<br /></span><span style="color: rgb(0, 128, 128);">2</span>聽<span style="color: rgb(0, 0, 0);">{<br /></span><span style="color: rgb(0, 128, 128);">3</span>聽 聽聽 <span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">聽str;<br /></span><span style="color: rgb(0, 128, 128);">4</span><span style="color: rgb(0, 0, 0);">聽聽聽 cout聽</span><span style="color: rgb(0, 0, 0);"><<</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">please聽enter聽your聽name\n</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">5</span><span style="color: rgb(0, 0, 0);">聽聽聽 getline(cin,str);<br /></span><span style="color: rgb(0, 128, 128);">6</span> 聽聽聽 <span style="color: rgb(0, 0, 0);">cout聽</span><span style="color: rgb(0, 0, 0);"><<</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Hello,</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);"><<</span><span style="color: rgb(0, 0, 0);">聽str聽</span><span style="color: rgb(0, 0, 0);"><<</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">!\n</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">7</span>聽<span style="color: rgb(0, 0, 0);">}</span></div><br /> 鍜屽ぇ瀹跺垎浜竴涓?img src ="http://www.shnenglu.com/apollo/aggbug/6152.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/apollo/" target="_blank">絎戠瑧鐢?/a> 2006-04-24 12:13 <a href="http://www.shnenglu.com/apollo/archive/2006/04/24/6152.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>緇х畫璐撮潰璇曢鐩?/title><link>http://www.shnenglu.com/apollo/archive/2006/04/12/5427.html</link><dc:creator>絎戠瑧鐢?/dc:creator><author>絎戠瑧鐢?/author><pubDate>Wed, 12 Apr 2006 14:45:00 GMT</pubDate><guid>http://www.shnenglu.com/apollo/archive/2006/04/12/5427.html</guid><wfw:comment>http://www.shnenglu.com/apollo/comments/5427.html</wfw:comment><comments>http://www.shnenglu.com/apollo/archive/2006/04/12/5427.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/apollo/comments/commentRss/5427.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/apollo/services/trackbacks/5427.html</trackback:ping><description><![CDATA[浠婂ぉ鏃╀笂鐨勯潰璇曢9閬擄紝姣旇緝闅撅紝鍚戠墰浜鴻鏁欙紝鍥藉唴鐨勪竴鐗涘叕鍙革紝鍧愯惤鍦ㄥ寳浜寳鍥涚幆鏌愬ぇ鍘︼細(xì)<br /> 1銆佺嚎褰㈣〃a銆乥涓轟袱涓湁搴忓崌搴忕殑綰垮艦琛紝緙栧啓涓紼嬪簭錛屼嬌涓や釜鏈夊簭綰垮艦琛ㄥ悎騫舵垚涓涓湁搴忓崌搴忕嚎褰㈣〃h錛?br /> 2銆佽繍鐢ㄥ洓鑹插畾鐞嗭紝涓篘涓眬鍩熶婦琛岄厤鑹詫紝棰滆壊涓?銆?銆?銆?鍥涚錛屽彟鏈夋暟緇刟dj[][N]錛屽adj[i][j]=1鍒欒〃紺篿鍖哄煙涓巎鍖哄煙鐩擱偦錛屾暟緇刢olor[N]錛屽color[i]=1,琛ㄧずi鍖哄煙鐨勯鑹蹭負(fù)1鍙烽鑹層?br /> 3銆佺敤閫掑綊綆楁硶鍒ゆ柇鏁扮粍a[N]鏄惁涓轟竴涓掑鏁扮粍銆?br /> 4銆佺紪鍐欑畻娉曪紝浠?0浜夸釜嫻偣鏁板綋涓紝閫夊嚭鍏朵腑鏈澶х殑10000涓?br /> 5銆佺紪鍐欎竴unix紼嬪簭錛岄槻姝㈠兊灝歌繘紼嬬殑鍑虹幇.<br /><br /> 鍚屽鐨?閬撻潰璇曢錛屽簲鑱樼殑鑱屼綅鏄悳绱㈠紩鎿庡伐紼嬪笀錛屽悗涓ら亾瓚呯駭闅撅紝錛堝笇鏈涘ぇ瀹跺緇欎竴浜涚畻鍙戯級(jí)<br /> 1.緇欎袱涓暟緇勫拰浠栦滑鐨勫ぇ灝忥紝榪樻湁涓鍔ㄦ佸紑杈熺殑鍐呭瓨錛屾眰浜ら泦錛屾妸浜ら泦鏀懼埌鍔ㄦ佸唴瀛榙ongtai錛屽茍涓旇繑鍥炰氦闆嗕釜鏁?br /> long jiaoji(long* a[],long b[],long* alength,long blength,long* dongtai[])<br /> 2.鍗曡繛琛ㄧ殑寤虹珛錛屾妸'a'--'z'26涓瓧姣嶆彃鍏ュ埌榪炶〃涓紝騫朵笖鍊掑彊錛岃繕瑕佹墦鍗幫紒<br /> 3.鍙曠殑棰樼洰緇堜簬鏉ヤ簡(jiǎn)<br /> 璞℃悳绱㈢殑杈撳叆淇℃伅鏄竴涓瓧絎︿覆錛岀粺璁?00涓囪緭鍏ヤ俊鎭腑鐨勬渶鐑棬鐨勫墠鍗佹潯錛屾垜浠瘡嬈¤緭鍏ョ殑涓涓瓧絎︿覆涓轟笉瓚呰繃255byte,鍐呭瓨浣跨敤鍙湁1G,<br /> 璇鋒弿榪版濇兂錛屽啓鍑虹畻鍙戯紙c璇█錛夛紝絀洪棿鍜屾椂闂村鏉傚害錛?br /> 4.鍥藉唴鐨勪竴浜涘笘鍚э紝濡俠aidu,鏈夊嚑鍗佷竾涓富棰橈紝鍋囪姣忎竴涓富棰橀兘鏈変笂浜跨殑璺熷笘瀛愶紝鎬庝箞鏍瘋璁¤繖涓郴緇熼熷害鏈濂斤紝璇鋒弿榪版濇兂錛屽啓鍑虹畻鍙戯紙c璇█錛夛紝絀洪棿鍜屾椂闂村鏉傚害錛?img src ="http://www.shnenglu.com/apollo/aggbug/5427.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/apollo/" target="_blank">絎戠瑧鐢?/a> 2006-04-12 22:45 <a href="http://www.shnenglu.com/apollo/archive/2006/04/12/5427.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>sap鐨勫嚑閬撶瑪璇曢鐩?杞?http://www.shnenglu.com/apollo/archive/2006/04/12/5426.html絎戠瑧鐢?/dc:creator>絎戠瑧鐢?/author>Wed, 12 Apr 2006 14:35:00 GMThttp://www.shnenglu.com/apollo/archive/2006/04/12/5426.htmlhttp://www.shnenglu.com/apollo/comments/5426.htmlhttp://www.shnenglu.com/apollo/archive/2006/04/12/5426.html#Feedback2http://www.shnenglu.com/apollo/comments/commentRss/5426.htmlhttp://www.shnenglu.com/apollo/services/trackbacks/5426.html class base{
private: int i;
public: base(int x){i=x;}
};
class derived: public base{
private: int i;
public: derived(int x, int y) {i=x;}
void printTotal() {int total = i+base::i;}
};



2. Assume you have a class like

class erp
{
HR* m_hr;
FI* m_fi;
public:
erp()
{
m_hr = new HR();
m_fi = new FI();
}
~erp()
{
}
};

if "new FI()" failed in the constructor, how can you detect this problem and
release the properly allocated member pointer m_hr?

3. Check the class and variable definition below:

#include <iostream>
#include <complex>
using namespace std;
class Base
{
public:
Base() { cout<<"Base-ctor"<<endl; }
~Base() { cout<<"Base-dtor"<<endl; }
virtual void f(int) { cout<<"Base::f(int)"<<endl; }
virtual void f(double) {cout<<"Base::f(double)"<<endl; }
virtual void g(int i = 10) {cout<<"Base::g()"<<i<<endl; }
};

class Derived: public Base
{
public:
Derived() { cout<<"Derived-ctor"<<endl; }
~Derived() { cout<<"Derived-dtor"<<endl; }
void f(complex<double>) { cout<<"Derived::f(complex)"<<endl; }
virtual void g(int i = 20) {cout<<"Derived::g()"<<i<<endl; }
};

Base b;
Derived d;

Base* pb = new Derived;
Select the correct one from the four choices:
Cout<<sizeof(Base)<<endl;
A. 4 B.32 C.20 D.Platform-dependent
Cout<<sizeof(Base)<<endl;
A. 4 B.8 C.36 D.Platform-dependent
pb->f(1.0);
A.Derived::f(complex) B.Base::f(double)
pb->g();
A.Base::g() 10 B.Base::g() 20
C.Derived::g() 10 D.Derived::g() 20

4.Implement the simplest singleton pattern(initialize if necessary).

5.Name three sort algorithms you are familiar with. Write out the correct
order by the average time complexity.

6.Write code to sort a duplex direction linklist. The node T has overridden
the comparision operators.


7.Below is usual way we find one element in an array:

const int *find1(const int* array, int n, int x)
{
const int* p = array;
for(int i = 0; i < n; i++)
{
if(*p == x)
{
return p;
}
++p;
}
return 0;
}

In this case we have to bear the knowledge of value type "int", the size of
array, even the existence of an array. Would you re-write it using template
to eliminate all these dependencies?

]]>
国产精品久久久久久久| 狠狠色丁香婷婷久久综合| 久久夜色精品国产噜噜麻豆| 色婷婷综合久久久久中文 | 99久久免费国产特黄| 99久久国产热无码精品免费久久久久| 国产国产成人久久精品| 久久婷婷五月综合色奶水99啪| 狠狠色婷婷久久一区二区三区| 91久久精品国产成人久久| 久久无码AV中文出轨人妻| 97久久超碰成人精品网站| 青青草国产97免久久费观看| 久久99精品久久久久久| 精品人妻伦九区久久AAA片69| 一本色道久久综合亚洲精品| 国产亚洲色婷婷久久99精品91| 77777亚洲午夜久久多人| 久久综合九色综合97_久久久| 日韩精品久久久久久久电影| 97精品伊人久久久大香线蕉| 色综合久久久久无码专区| 久久se精品一区二区影院| 国产麻豆精品久久一二三| 日韩美女18网站久久精品| 久久久精品一区二区三区| 少妇精品久久久一区二区三区 | 日韩欧美亚洲综合久久影院Ds | 国产午夜精品久久久久九九电影| 久久精品国产色蜜蜜麻豆| 久久久久国产| 蜜桃麻豆www久久国产精品| 国产 亚洲 欧美 另类 久久| 91久久精一区二区三区大全| 亚洲成色www久久网站夜月| 久久天天婷婷五月俺也去| 最新久久免费视频| 亚洲午夜久久久久妓女影院 | 久久www免费人成看国产片| 久久福利青草精品资源站免费| 国内精品九九久久久精品|