我的C++实践 (1-9)

论坛 期权论坛     
选择匿名的用户   2021-5-30 01:40   280   0
<p><br> </p>
<p style="text-align:center"><a href="http://blog.csdn.net/zhoudaxia/article/details/4456571" style="color:rgb(51,51,51); text-decoration:none; font-family:&#39;Microsoft YaHei&#39;; font-size:20px; line-height:30px">我的C&#43;&#43;实践(1):Stack的实现</a><br> </p>
<p><span style="color:rgb(68,68,68); font-family:Tahoma,Helvetica,SimSun,sans-serif,Hei; line-height:21px">转自 <a href="http://blog.csdn.net/zz457887107/article/details/6620510"></a><a href="http://blog.csdn.net/zhoudaxia/article/details/4456571">http://blog.csdn.net/zhoudaxia/article/details/4456571</a><br> </span></p>
<p><span style="color:rgb(68,68,68); font-family:Tahoma,Helvetica,SimSun,sans-serif,Hei; line-height:21px"></span></p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:Arial; font-size:14.44444465637207px; line-height:25.98958396911621px">    (1)基本的Stack:以std::deque为内部容器。方法有入栈、出栈、返回栈顶元、判断栈空。</p>
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:Arial; font-size:14.44444465637207px; line-height:25.98958396911621px"> </p>
<div class="dp-highlighter bg_cpp" style="font-family:Consolas,&#39;Courier New&#39;,Courier,mono,serif; background-color:rgb(231,229,220); width:1060.625px; overflow:auto; padding-top:1px; margin:18px 0px!important">
<div class="bar" style="padding-left:45px">
  <div class="tools" style="padding:3px 8px 10px 10px; font-size:9px; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; color:silver; background-color:rgb(248,248,248); border-left-width:3px; border-left-style:solid; border-left-color:rgb(108,226,108)">
   <strong>[cpp]</strong>
   <a class="ViewSource" href="http://blog.csdn.net/zhoudaxia/article/details/4456571#" style="color:rgb(160,160,160); text-decoration:none; background-color:inherit; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px" title="view plain">view plain</a>
   <a class="CopyToClipboard" href="http://blog.csdn.net/zhoudaxia/article/details/4456571#" style="color:rgb(160,160,160); text-decoration:none; background-color:inherit; border:none; padding:1px; margin:0px 10px 0px 0px; font-size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px" title="copy">copy</a>
   <div style="position:absolute; left:381px; top:503px; width:18px; height:18px; z-index:99">
   </div>
  </div>
</div>
<ol class="dp-cpp" start="1" style="padding:0px; border:none; list-style-position:initial; background-color:rgb(255,255,255); color:rgb(92,92,92); margin:0px 0px 1px 45px!important"><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:20px; margin:0px!important; padding:0px 3px 0px 10px!important"> <span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span class="comment" style="margin:0px; padding:0px; border:none; color:rgb(0,130,0); background-color:inherit">//stack1.h:栈的基本实现</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">  </span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:20px; margin:0px!important; padding:0px 3px 0px 10px!important"> <span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span class="preprocessor" style="margin:0px; padding:0px; border:none; color:gray; background-color:inherit">#ifndef __STACK1_H__</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">  </span></span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:20px; margin:0px!important; padding:0px 3px 0px 10px!important"> <span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span class="preprocessor" style="margin:0px; padding:0px; border:none; color:gray; background-color:inherit">#define __STACK1_H__</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">  </span></span></li><li style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; background-color:rgb(248,248,248); line-height:20px; margin:0px!important; padding:0px 3px 0px 10px!important"> <span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span class="preprocessor" style="margin:0px; padding:0px; border:none; color:gray; background-color:inherit">#include &lt;deque&gt;</span><span style="margin:0px; padding:0px; border:none; background-color:inherit">  </span></span></li><li class="alt" style="border-style:none none none solid; border-left-width:3px; border-left-color:rgb(108,226,108); list-style:decimal-leading-zero outside; color:inherit; line-height:20px; margin:0px!important; padding:0px 3px 0px 10px!important"> <span style="margin:0px; padding:0px; border:none; color:black; background-color:inherit"><span class="preprocessor" style="margin:0px; padding:0px; border:none; color:gray; background-color:inherit">#include &lt;stdexcept&gt;</span><span style="margin:0px
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP