﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-SEMAN-随笔分类-STL</title><link>http://www.cppblog.com/SEMAN/category/179.html</link><description>曾经沧海难为水、除却巫山不是云</description><language>zh-cn</language><lastBuildDate>Thu, 29 May 2008 04:21:55 GMT</lastBuildDate><pubDate>Thu, 29 May 2008 04:21:55 GMT</pubDate><ttl>60</ttl><item><title>比饶口令还饶口的复杂声明</title><link>http://www.cppblog.com/SEMAN/archive/2005/11/02/907.html</link><dc:creator>味全每日C++</dc:creator><author>味全每日C++</author><pubDate>Wed, 02 Nov 2005 14:08:00 GMT</pubDate><guid>http://www.cppblog.com/SEMAN/archive/2005/11/02/907.html</guid><wfw:comment>http://www.cppblog.com/SEMAN/comments/907.html</wfw:comment><comments>http://www.cppblog.com/SEMAN/archive/2005/11/02/907.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.cppblog.com/SEMAN/comments/commentRss/907.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/SEMAN/services/trackbacks/907.html</trackback:ping><description><![CDATA[<P>&nbsp;</P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><FONT face=Tahoma><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">**</SPAN><SPAN style="COLOR: #000000">&nbsp;p1;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;pointer&nbsp;to&nbsp;pointer&nbsp;to&nbsp;char</SPAN></FONT><SPAN style="COLOR: #008000"><BR></SPAN><FONT face=Tahoma><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">**</SPAN><SPAN style="COLOR: #000000">p2;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;pointer&nbsp;to&nbsp;pointer&nbsp;to&nbsp;const&nbsp;char</SPAN></FONT><SPAN style="COLOR: #008000"><BR></SPAN><FONT face=Tahoma><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">&nbsp;p3;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;pointer&nbsp;to&nbsp;const&nbsp;pointer&nbsp;to&nbsp;char</SPAN></FONT><SPAN style="COLOR: #008000"><BR></SPAN><FONT face=Tahoma><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">&nbsp;p4;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;pointer&nbsp;to&nbsp;const&nbsp;pointer&nbsp;to&nbsp;const&nbsp;char</SPAN></FONT><SPAN style="COLOR: #008000"><BR></SPAN><FONT face=Tahoma><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">**</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">&nbsp;p5;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;pointer&nbsp;to&nbsp;pointer&nbsp;to&nbsp;char</SPAN></FONT><SPAN style="COLOR: #008000"><BR></SPAN><FONT face=Tahoma><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">**</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">&nbsp;p6;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;pointer&nbsp;to&nbsp;pointer&nbsp;to&nbsp;const&nbsp;char</SPAN></FONT><SPAN style="COLOR: #008000"><BR></SPAN><FONT face=Tahoma><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">&nbsp;p7;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;pointer&nbsp;to&nbsp;const&nbsp;pointer&nbsp;to&nbsp;char</SPAN></FONT><SPAN style="COLOR: #008000"><BR></SPAN><FONT face=Tahoma><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">&nbsp;p8;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;const&nbsp;pointer&nbsp;to&nbsp;const&nbsp;pointer&nbsp;to&nbsp;const&nbsp;char</SPAN></FONT></DIV>
<P><BR>注：p1是指向char类型的指针的指针；<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p2是指向const char类型的指针的指针；<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p3是指向char类型的const指针；<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p4是指向const char类型的const指针；<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p5是指向char类型的指针的const指针；<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p6是指向const char类型的指针的const指针；<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p7是指向char类型const指针的const指针；<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p8是指向const char类型的const指针的const指针。<BR></P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><FONT face=Tahoma><FONT size=2><SPAN style="COLOR: #000000">typedef&nbsp;</SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">&nbsp;a;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;a&nbsp;is&nbsp;a&nbsp;pointer&nbsp;to&nbsp;a&nbsp;char&nbsp;</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Tahoma size=2>typedef&nbsp;a&nbsp;b();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><FONT face=Tahoma><FONT size=2><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;b&nbsp;is&nbsp;a&nbsp;function&nbsp;that&nbsp;returns&nbsp;a&nbsp;pointer&nbsp;to&nbsp;a&nbsp;char</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Tahoma size=2>typedef&nbsp;b&nbsp;</FONT></SPAN><FONT face=Tahoma><FONT size=2><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">c;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;c&nbsp;is&nbsp;a&nbsp;pointer&nbsp;to&nbsp;a&nbsp;function&nbsp;that&nbsp;returns&nbsp;a&nbsp;pointer&nbsp;to&nbsp;a&nbsp;char&nbsp;</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Tahoma size=2>typedef&nbsp;c&nbsp;d();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><FONT face=Tahoma><FONT size=2><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;d&nbsp;is&nbsp;a&nbsp;function&nbsp;returning&nbsp;a&nbsp;pointer&nbsp;to&nbsp;a&nbsp;function&nbsp;that&nbsp;returns&nbsp;a&nbsp;pointer&nbsp;to&nbsp;a&nbsp;char&nbsp;</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Tahoma size=2>typedef&nbsp;d&nbsp;</FONT></SPAN><FONT face=Tahoma><FONT size=2><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">e;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;e&nbsp;is&nbsp;a&nbsp;pointer&nbsp;to&nbsp;a&nbsp;function&nbsp;returning&nbsp;a&nbsp;pointer&nbsp;to&nbsp;a&nbsp;function&nbsp;that&nbsp;a&nbsp;pointer&nbsp;to&nbsp;a&nbsp;char&nbsp;</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Tahoma size=2>e&nbsp;var[</FONT></SPAN><FONT face=Tahoma><FONT size=2><SPAN style="COLOR: #000000">10</SPAN><SPAN style="COLOR: #000000">];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><FONT face=Tahoma size=2>&nbsp;var&nbsp;is&nbsp;an&nbsp;array&nbsp;of&nbsp;10&nbsp;pointers&nbsp;to&nbsp;functions&nbsp;returning&nbsp;pointers&nbsp;to&nbsp;&nbsp;functions&nbsp;returning&nbsp;pointers&nbsp;to&nbsp;chars.</FONT><BR></SPAN></DIV>
<P><BR>原文地址：<A href="http://www.codeproject.com/cpp/complex_declarations.asp">http://www.codeproject.com/cpp/complex_declarations.asp</A></P><img src ="http://www.cppblog.com/SEMAN/aggbug/907.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/SEMAN/" target="_blank">味全每日C++</a> 2005-11-02 22:08 <a href="http://www.cppblog.com/SEMAN/archive/2005/11/02/907.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>二叉树的模板实现</title><link>http://www.cppblog.com/SEMAN/archive/2005/10/24/819.html</link><dc:creator>味全每日C++</dc:creator><author>味全每日C++</author><pubDate>Mon, 24 Oct 2005 03:06:00 GMT</pubDate><guid>http://www.cppblog.com/SEMAN/archive/2005/10/24/819.html</guid><wfw:comment>http://www.cppblog.com/SEMAN/comments/819.html</wfw:comment><comments>http://www.cppblog.com/SEMAN/archive/2005/10/24/819.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/SEMAN/comments/commentRss/819.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/SEMAN/services/trackbacks/819.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;#include&nbsp;"iostream.h"#include&nbsp;"stdlib.h"#include&nbsp;"stack.h"#pragma&nbsp;oncetemplate&lt;class&nbsp;T&gt;class&nbsp;CBiTree{&nbsp;&nbsp;&nbsp;&nbsp;public:&nbsp;&nbsp;&nbsp;&nbsp;...&nbsp;&nbsp;<a href='http://www.cppblog.com/SEMAN/archive/2005/10/24/819.html'>阅读全文</a><img src ="http://www.cppblog.com/SEMAN/aggbug/819.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/SEMAN/" target="_blank">味全每日C++</a> 2005-10-24 11:06 <a href="http://www.cppblog.com/SEMAN/archive/2005/10/24/819.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>