亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tour-stdcxx.html

?? 密碼大家Shoup寫的數論算法c語言實現
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
<html><head><title>A Tour of NTL: Traditional and ISO Modes  </title></head><body bgcolor="#fff9e6"><center><a href="tour-modules.html"><img src="arrow1.gif" alt="[Previous]" align=bottom></a> <a href="tour.html"><img src="arrow2.gif" alt="[Up]" align=bottom></a> <a href="tour-unix.html"> <img src="arrow3.gif" alt="[Next]" align=bottom></a></center><h1> <p align=center>A Tour of NTL: Traditional and ISO Modes</p></h1><p> <hr> <p><p>As of version 4.1,NTL can be compiled and used in one of two modes: Traditional or ISO.To get ISO mode, you can pass <tt>NTL_STD_CXX=on</tt>as an argument to the configuration scriptwhen <a href="tour-unix.html">installing NTL on a Unix or Unix-like system</a>.This will set the flag <tt>NTL_STD_CXX</tt> in the <tt>config.h</tt>file.Alternatively (and especially on non-Unix systems),you can set this flag  by hand by editing the the <tt>config.h</tt> file.<p>Traditional mode provides the same interface as that provided in versions 4.0 and earlier.Traditional mode is also the default, so old programs that used NTLshould continue to work without any changes.So if you wish, you can completely ignore the new ISO mode, and ignorethe rest of this page.However, if you want to fully exploit some important,new features of <tt>C++</tt>, in particular <i>namespaces</i>, read on.Also, it is likely that in future distributions of NTL, ISO mode will becomethe default mode, although Traditional mode will continue tobe supported indefinitely.<p>In Traditional mode, the NTL header files include the traditional<tt>C++</tt> header files <tt>&lt;stdlib.h&gt;</tt>,<tt>&lt;math.h&gt;</tt>, and <tt>&lt;iostream.h&gt;</tt>.These files declare a number of names (functions, types, etc.)in the <i>global namespace</i>.Additionally, the NTL header files declare a number of names,also in the global namespace.<p>In ISO mode, the NTL header files include the new <tt>C++</tt> header files <tt>&lt;cstdlib&gt;</tt>,<tt>&lt;cmath&gt;</tt>, and <tt>&lt;iostream&gt;</tt>.These new header files are essentially the same as the traditional ones,except that all the the names are declared in a namespace called <tt>std</tt>.Additionally, the NTL header files declare a number of names,but these are all declared within a namespace called <tt>NTL</tt>.<p>ISO mode uses <tt>C++</tt> features that are new tothe new ISO <tt>C++</tt> standard.I know of no compiler that truly implements all of the standard,but some come pretty close.If your complier is too old, you will not be able to use NTL in ISO mode;  otherwise, you are free to use either ISO or Traditional mode,but I would recommend ISO mode for code that you expect tobe around for a long time.In particular, if you want to develop and distribute a library thatbuilds on top of NTL, it would be preferable to make it compatiblewith NTL in ISO mode, and even better, to make it compatible witheither mode.<p>The upshot is, NTL will remain usable in Traditional indefinitely,assuming compilers maintain reasonable backward compatibilty with pre-standard <tt>C++</tt> conventions for header files;however, if you want to <i>program for the future</i>, it is recommendedto use ISO mode.<p><h3>A crash course on namespaces</h3><p>As already mentioned, the main difference between Traditional and ISOmode is that in ISO mode, all names are wrapped in namespaces.Namespaces are a feature that was introduced in the new <tt>C++</tt> standard.One can declare names (functions, types, etc.) inside a namespace.By default,such names are not visible outside the namespace without explicitqualification.<p>The main advantage of namespaces is that it solves the <i>namespace pollutionproblem</i>:if two libraries define the same name in two inconsistent ways,it is very difficult, if not impossible,to combine these two libraries in the same program.<p>The traditional way of avoiding such problems in languages like<tt>C</tt> is for a library designer to attach a prefix specificto that library to all names.This works, but makes for ugly code.The function overloading mechanism in <tt>C++</tt> eases the problem a bit,but is still not a complete solution.<p>The newnamespace feature in <tt>C++</tt>provides a reasonably complete and elegant solution to the namespacepollution problem.It is one of the nicest and most important recent additions to the <tt>C++</tt>language.<p>Here is a simple example to illustrate namespaces.<p><pre>namespace N {   void f(int);   void g(int);   int x;}int x;void h(){   x = 1;    // the global x   N::x = 0; // the x in namespace N   N::f(0);  // the f in namespace N   g(1);     // error -- g is not visible here}</pre><p>All of this explicit qualification businesscan be a bit tedious.The easiest way to avoid this tedium is to use what is calleda <i>using directive</i>, which effectively makesall names declared within a namespace visible in theglobal scope.Here is a variation on the previous example, with a using directive.<p><pre>namespace N {   void f(int);   void g(int);   int x;}int x;using namespace N;void h(){   x = 1;    // error -- ambiguous: the global x or the x in namespace N?   ::x = 1;  // the global x   N::x = 0; // the x in namespace N   N::f(0);  // the f in namespace N   f(0);     // OK -- N::f(int) is visible here   g(1);     // OK -- N::g(int) is visible here}</pre><p>Here is another example.<p><pre>namespace N1 {   int x;   void f(int);   void g(int);}namespace N2 {   int x;   int y;   void f(double);   void g(int);}using namespace N1;using namespace N2;void h(){   x = 1;     // error -- ambiguous: N1::x or N2::x?   N1::x = 1; // OK   N2::x = 1; // OK   y = 1;     // OK  -- this is N2::y   g(0);      // error -- ambiguous: N1::g(int) or N2::g(int)?   f(0);      // OK -- N1::f(int), because it is the "best" match    f(0.0);    // OK  -- N2::f(double), because it is the "best" match}</pre><p>This example illustrates the interaction between using declarationsand function overloading resolution.If several overloaded versions of a function are visible,it is not necessarily ambiguous: the usual overload resolutionprocedure is applied, and if there is a unique "best" match,then there is no ambiguity.<p>The examples presented here do not illustrate all of thefeatures and nuances of namespaces.For this, you are referred to a <tt>C++</tt> book.<p><h3>Namespaces and NTL</h3><p>In ISO mode, the standard library is "wrapped" in namespace <tt>std</tt>,and NTL is "wrapped" in namespace <tt>NTL</tt>.Thus, the header file <tt>&lt;NTL/ZZ.h&gt;</tt> in ISO mode lookssomething like this:<pre>namespace NTL {   // ...   class ZZ { /* ... */ };   // ...   ZZ operator+(const ZZ&amp; a, const ZZ&amp; b);   ZZ operator*(const ZZ&amp; a, const ZZ&amp; b);   std::istream&amp; operator>>(std::istream&amp; s, ZZ&amp; x);   std::ostream&amp; operator<<(std::ostream&amp; s, const ZZ&amp; a);   // ...  }</pre>Therefore, one must explicitly qualify all names, or use appropriateusing directives.Here is how one could write the <a href="tour-ex1.html">first example</a> of the tour inISO mode.<pre>#include &lt;NTL/ZZ.h&gt;int main(){   NTL::ZZ a, b, c;    std::cin &gt;&gt; a;    std::cin &gt;&gt; b;    c = (a+1)*(b+1);   std::cout &lt;&lt; c &lt;&lt; "\n";}</pre><p>Notice how everything is explicitly qualified.Actually, the input/output operators <tt>&lt;&lt;</tt> and <tt>&gt;&gt;</tt>,and the arithmetic operators <tt>+</tt> and <tt>*</tt> are not explicitlyqualified, but rather, the compiler finds them through a gimmickcalled <i>Koenig Lookup</i>, which will look for functions (and operators)declared in namespace <tt>NTL</tt>, because the type of the argument(<tt>ZZ</tt>) is a class declared in that namespace.<p>Even with Koenig Lookup, explicit qualification canbe a bit tedious.Here is the same example, this time with using directives.<pre>#include &lt;NTL/ZZ.h&gt;using namespace NTL;using namespace std;int main(){   ZZ a, b, c;    cin &gt;&gt; a;    cin &gt;&gt; b;    c = (a+1)*(b+1);   cout &lt;&lt; c &lt;&lt; "\n";}</pre>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久国产一区二区三区四区小说| 91在线精品一区二区| 国产欧美综合在线| 欧美日本视频在线| 91麻豆精东视频| 亚洲精选免费视频| 国产精品久久福利| 26uuu亚洲综合色| 日韩欧美一区二区久久婷婷| 欧美日韩黄色影视| 在线观看免费一区| 91碰在线视频| 91激情五月电影| 色哟哟国产精品| 一本高清dvd不卡在线观看| 久久99蜜桃精品| 亚洲成人精品一区| 亚洲午夜国产一区99re久久| 一区二区三区在线观看国产| 亚洲一区二区在线免费看| 一区二区三区欧美激情| 亚洲精品网站在线观看| 国产精品传媒在线| 一区二区免费视频| 亚洲与欧洲av电影| 同产精品九九九| 日韩黄色一级片| 久久国产剧场电影| 国产精品影视在线| 成av人片一区二区| 日本丶国产丶欧美色综合| 在线观看91视频| 色综合久久天天综合网| 色噜噜狠狠色综合欧洲selulu| 色综合久久99| 日韩一区二区在线免费观看| 日本一区二区免费在线观看视频| 国产精品你懂的| 一区二区三区丝袜| 日韩精品电影一区亚洲| 国产在线播精品第三| 99国产精品视频免费观看| 欧美日韩一区三区| 久久精品一区四区| 亚洲宅男天堂在线观看无病毒 | 伦理电影国产精品| 国产乱码精品一区二区三区忘忧草 | 国产成人午夜精品影院观看视频 | 久久九九全国免费| 亚洲区小说区图片区qvod| 亚洲一区视频在线观看视频| 日本三级亚洲精品| 成人黄色a**站在线观看| 色美美综合视频| 欧美sm极限捆绑bd| 亚洲高清视频的网址| 国产精品一级在线| 欧洲精品在线观看| 国产亚洲一区二区在线观看| 亚洲午夜激情av| 成人网在线免费视频| 日韩亚洲欧美一区二区三区| 中文字幕欧美国产| 韩国女主播成人在线| 欧美在线不卡视频| 国产调教视频一区| 国产精品电影一区二区三区| 久久精品国产一区二区三区免费看| 成人美女视频在线看| 日韩欧美在线一区二区三区| 一区二区三区中文字幕| 成人一区在线看| 久久久一区二区| 蜜桃久久av一区| 欧美视频日韩视频在线观看| 亚洲丝袜另类动漫二区| 国产一区二区伦理| 日韩欧美亚洲国产另类| 亚洲成av人片在线| 欧美午夜精品一区二区三区| 国产精品网友自拍| 大桥未久av一区二区三区中文| 日韩欧美的一区二区| 日本美女一区二区三区| 欧美群妇大交群中文字幕| 亚洲一二三级电影| 欧美综合天天夜夜久久| 亚洲精品乱码久久久久久日本蜜臀| 成人在线视频一区| 国产精品高潮呻吟| 成人免费福利片| 国产精品素人视频| 99re6这里只有精品视频在线观看| 国产视频一区二区三区在线观看| 国产麻豆精品久久一二三| 亚洲精品在线一区二区| 国产精品亚洲人在线观看| 26uuu欧美| 精品免费一区二区三区| 久久99精品一区二区三区| 久久老女人爱爱| 福利电影一区二区| 亚洲日本欧美天堂| 欧美在线免费视屏| 亚洲va国产va欧美va观看| 欧美日韩国产电影| 蜜桃精品视频在线观看| 久久欧美一区二区| 99re热这里只有精品免费视频| 一区二区在线看| 欧美精品一卡二卡| 蜜臀av性久久久久蜜臀aⅴ| 久久综合九色综合久久久精品综合 | 亚洲高清一区二区三区| 97久久精品人人澡人人爽| 国产精品美女久久久久久久| 日本福利一区二区| 麻豆精品视频在线观看视频| 久久久久88色偷偷免费| 91久久一区二区| 久久福利视频一区二区| 国产精品美女久久久久av爽李琼| 一本一本大道香蕉久在线精品| 亚洲大片在线观看| 国产三级精品视频| 欧美一a一片一级一片| 国产一区二区主播在线| 一区二区欧美视频| 久久久91精品国产一区二区三区| 在线观看一区二区视频| 日本中文一区二区三区| 精品国免费一区二区三区| 91麻豆精品秘密| 国产一区视频在线看| 亚洲综合自拍偷拍| 国产精品人妖ts系列视频| 久久这里只有精品6| 日韩一区二区三区电影在线观看| 在线观看不卡视频| 色8久久精品久久久久久蜜| 97aⅴ精品视频一二三区| 成人影视亚洲图片在线| 国产a精品视频| 国产精品1区二区.| 国产精品一卡二| 高清久久久久久| 国产福利91精品| 国产成人免费视频一区| 国产美女一区二区| 国产九色sp调教91| 国产成人自拍网| 成人午夜精品一区二区三区| 成人一道本在线| 91视频91自| 欧美性大战久久久| 欧美性高清videossexo| 欧美精品 日韩| 欧美成人一区二区三区在线观看| 欧美妇女性影城| 日韩欧美国产精品一区| 精品国产免费一区二区三区四区 | 国产精品网站导航| 18成人在线观看| 一区二区三区四区中文字幕| 亚洲一区二区欧美| 日韩在线观看一区二区| 日韩中文字幕一区二区三区| 美女一区二区视频| 国产盗摄一区二区| 一本大道久久a久久综合婷婷| 欧美性猛交xxxxxxxx| 欧美www视频| 国产无一区二区| 一区二区三区.www| 紧缚奴在线一区二区三区| 成人免费视频一区| 欧美日韩在线亚洲一区蜜芽| 日韩欧美在线综合网| 国产精品护士白丝一区av| 亚洲国产日韩综合久久精品| 激情综合五月天| 91麻豆精东视频| 日韩欧美一区二区在线视频| 国产精品乱人伦中文| 天堂午夜影视日韩欧美一区二区| 免费在线看成人av| 91在线观看免费视频| 91精品国产综合久久精品app| 久久一区二区三区国产精品| 亚洲激情中文1区| 精品亚洲欧美一区| 欧美亚日韩国产aⅴ精品中极品| 欧美一二三在线| 亚洲蜜臀av乱码久久精品蜜桃| 久久成人综合网| 欧美性淫爽ww久久久久无| 国产色91在线| 奇米影视在线99精品| 欧美影院精品一区| 欧美激情自拍偷拍|