<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">
<HTML LANG="EN">
<HEAD>
<TITLE>More Effective C++ | Book</TITLE>
<LINK REL=STYLESHEET HREF=../INTRO/ECMEC.CSS>
<SCRIPT LANGUAGE="Javascript" SRC="../JAVA/COOKIE.JS"></SCRIPT>
<SCRIPT LANGUAGE="Javascript">var imagemax = 35; setCurrentMax(35);</SCRIPT>
<SCRIPT LANGUAGE="Javascript" SRC="../JAVA/IMGDOC.JS"></SCRIPT>
<SCRIPT LANGUAGE="Javascript" SRC="../JAVA/NSIMGDOC.JS"></SCRIPT>
<SCRIPT LANGUAGE="Javascript" SRC="../JAVA/DINGBATS.JS"></SCRIPT>
<SCRIPT LANGUAGE="Javascript">var dingbase = "M_DIR.HTM"; var dingtext ="MEC++, P"; if (self == top) {
top.location.replace(dingbase + this.location.hash);
}</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" ONLOAD="setResize()">
<A NAME="pxi"></A><A NAME="pxii"></A><A NAME="ded"></A>
<!-- SectionName="MEC++ Dedication" -->
<DIV ALIGN="CENTER"><FONT SIZE="-1">Continue to <A HREF="#pxi">Acknowledgments</A></FONT></DIV>
<P><A NAME="dingp1"></A><font ID="mgtitle">Dedication</font><SCRIPT>create_link(1);</SCRIPT>
</P>
<P><A NAME="dingp2"></A><I>For Clancy, my favorite enemy within.</I><SCRIPT>create_link(2);</SCRIPT>
</P>
<!-- SectionName="MEC++ Acknowledgments" -->
<A NAME="pxi"></A><A NAME="pxii"></A>
<DIV ALIGN="CENTER"><FONT SIZE="-1">Back to <A HREF="#ded">Dedication</A> <BR>Continue to <A HREF="#1708">Introduction</A></FONT></DIV>
<P><A NAME="dingp3"></A><font ID="mgtitle"> Acknowledgments</font><SCRIPT>create_link(3);</SCRIPT>
</P>
<P><A NAME="dingp4"></A><A NAME="723"> </A>
A great number of people helped bring this book into existence. Some contributed ideas for technical topics, some helped with the process of producing the book, and some just made life more fun while I was working on <NOBR>it.<SCRIPT>create_link(4);</SCRIPT>
</NOBR></P>
<P><A NAME="dingp5"></A><A NAME="737"> </A>
When the number of contributors to a book is large, it is not uncommon to dispense with individual acknowledgments in favor of a generic "Contributors to this book are too numerous to mention." I prefer to follow the expansive lead of John L. Hennessy and David A. Patterson in <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=comparch" onMouseOver="self.status='Computer Architecture: A Quantitative Approach'; return true" onMouseOut="self.status=self.defaultStatus" target="_top"><I>Computer</NOBR> Architecture: A Quantitative Approach</I></A> (Morgan Kaufmann, 1995). In addition to motivating the comprehensive acknowledgments that follow, their book provides hard data for the 90-10 rule, which I refer to in <a href="#40995"onMouseOver = "self.status = 'Item 16'; return true" onMouseOut = "self.status = self.defaultStatus">Item 16</A>.<SCRIPT>create_link(5);</SCRIPT>
</p>
<P><A NAME="dingp6"></A><font ID="mhtitle">The Items</font><SCRIPT>create_link(6);</SCRIPT>
</P>
<A NAME="2764"> </A>
<P><A NAME="dingp7"></A>
With the exception of direct quotations, all the words in this book are mine. However, many of the ideas I discuss came from others. I have done my best to keep track of who contributed what, but I know I have included information from sources I now fail to recall, foremost among them many posters to the Usenet newsgroups <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=clcfaq" ONMOUSEOVER ="self.status = 'comp.lang.c++ Newsgroup'; return true" ONMOUSEOUT="self.status=self.defaultStatus" TARGET="_top"><CODE>comp.lang.c++</CODE></NOBR></a> and <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=compstdc" ONMOUSEOVER ="self.status = 'comp.std.c++ Newsgroup'; return true" ONMOUSEOUT="self.status=self.defaultStatus" TARGET="_top">comp.std.c++</CODE></NOBR></a>.<SCRIPT>create_link(7);</SCRIPT>
</P><A NAME="1518"> </A>
<P><A NAME="dingp8"></A>
Many ideas in the C++ community have been developed independently by many people. In what follows, I note only where <I>I</I> was exposed to particular ideas, not necessarily where those ideas <NOBR>originated.<SCRIPT>create_link(8);</SCRIPT>
</NOBR></P><A NAME="2226"> </A>
<P><A NAME="dingp9"></A>
Brian Kernighan suggested the use of macros to approximate the syntax of the new C++ casting operators I describe in <A HREF="#77216">Item 2</A>.<SCRIPT>create_link(9);</SCRIPT>
</P><A NAME="480"> </A>
<P><A NAME="dingp10"></A>
In <A HREF="#84818">Item 3</A>, my warning about deleting an array of derived class objects through a base class pointer is based on material in Dan Saks' "Gotchas" talk, which he's given at several conferences and trade <NOBR>shows.<SCRIPT>create_link(10);</SCRIPT>
</NOBR></P><A NAME="794"> </A>
<P><A NAME="dingp11"></A>
<A NAME="pxii"></A>In <A HREF="#5970">Item 5</A>, the proxy class technique for preventing unwanted application of single-argument constructors is based on material in Andrew Koenig's column in the January 1994 <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=cppreport" onMouseOver="self.status='C++ Report Home Page'; return true" onMouseOut="self.status=self.defaultStatus" target="_top"><I>C++</NOBR> Report</I></A>.<SCRIPT>create_link(11);</SCRIPT>
</P><A NAME="3421"> </A>
<P><A NAME="dingp12"></A>
James Kanze made a posting to <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=clcfaq" ONMOUSEOVER ="self.status = 'comp.lang.c++ Newsgroup'; return true" ONMOUSEOUT="self.status=self.defaultStatus" TARGET="_top"><CODE>comp.lang.c++</CODE></NOBR></a> on implementing postfix increment and decrement operators via the corresponding prefix functions; I use his technique in <A HREF="#5262">Item 6</A>.<SCRIPT>create_link(12);</SCRIPT>
</P><A NAME="3426"> </A>
<P><A NAME="dingp13"></A>
David Cok, writing me about material I covered in <NOBR><A HREF="../EC/INDEX.HTM"><I>Effective</NOBR> C++</I></A>, brought to my attention the distinction between <CODE>operator</CODE> <CODE>new</CODE> and the <CODE>new</CODE> operator that is the crux of <A HREF="#33985">Item 8</A>. Even after reading his letter, I didn't really understand the distinction, but without his initial prodding, I probably <I>still</I> <NOBR>wouldn't.<SCRIPT>create_link(13);</SCRIPT>
</NOBR></P><A NAME="813"> </A>
<P><A NAME="dingp14"></A>
The notion of using destructors to prevent resource leaks (used in <A HREF="#5292">Item 9</A>) comes from section 15.3 of Margaret A. Ellis' and Bjarne Stroustrup's <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=anncrm" onMouseOver="self.status='Annotated C++ Reference Manual Home Page'; return true" onMouseOut="self.status=self.defaultStatus" target="_top"><I>The</NOBR> Annotated C++ Reference Manual</I></A> (see <a href="E.HTM#p285">page 285</a>). There the technique is called <I>resource acquisition is initialization</I>. Tom Cargill suggested I shift the focus of the approach from resource acquisition to resource <NOBR>release.<SCRIPT>create_link(14);</SCRIPT>
</NOBR></P><A NAME="1185"> </A>
<P><A NAME="dingp15"></A>
Some of my discussion in <a href="#39749"onMouseOver = "self.status = 'Item 11'; return true" onMouseOut = "self.status = self.defaultStatus">Item 11</A> was inspired by material in Chapter 4 of <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=talgdp" onMouseOver="self.status='Taligent`s Guide to Designing Programs Home Page'; return true" onMouseOut="self.status=self.defaultStatus" target="_top"><I>Taligent's</NOBR> Guide to Designing Programs</I></A> (Addison-Wesley, <NOBR>1994).<SCRIPT>create_link(15);</SCRIPT>
</NOBR></P><A NAME="451"> </A>
<P><A NAME="dingp16"></A>
My
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
英文原版Effective C++ (1820个子文件)
awt 0B
AnchorMapFileFormatException.cl 376B
CDSearch.class 13KB
Perl5Compiler.class 13KB
Perl5Matcher.class 11KB
SearchPanel.class 10KB
Index.class 10KB
ResultList.class 8KB
TagStripperStream.class 6KB
HTMLIndexer.class 6KB
StreamTokenizer.class 6KB
StopWords.class 5KB
Util.class 4KB
SearchResult.class 3KB
Indexer.class 3KB
PatternMatcherInput.class 3KB
JSComm.class 3KB
BasicNavigator.class 3KB
AnimationCanvas.class 2KB
2.class 2KB
AnchorMapList.class 2KB
RawIndex.class 2KB
AnchorMap.class 2KB
Perl5StreamInput.class 2KB
HTMLFilter.class 2KB
1.class 2KB
3.class 1KB
SearchFrame.class 1KB
HTMLTokenFilter.class 1KB
JSObject.class 847B
Perl5Pattern.class 819B
CharArray.class 792B
BlockEntry.class 592B
FileEntry.class 590B
PatternMatcher.class 567B
WordEntry.class 551B
PatternCompiler.class 512B
WordFilter.class 426B
4.class 423B
MalformedPatternException.class 381B
MatchResult.class 375B
Navigator.class 345B
Pattern.class 241B
MessageArea.class 240B
ECMEC.CSS 2KB
invoke.exe 23KB
SCREEN5.GIF 112KB
BGROUND.GIF 76KB
SCREEN4.GIF 67KB
SCREEN2.GIF 61KB
SCREEN1.GIF 59KB
BGROUND.GIF 54KB
HOME.GIF 41KB
HOME.GIF 41KB
I_066A4.GIF 33KB
I_231A4.GIF 33KB
EXAMPLE4.GIF 33KB
I_231A5.GIF 30KB
EXAMPLE5.GIF 30KB
I_066A5.GIF 29KB
I_066A3.GIF 29KB
I_231A3.GIF 29KB
EXAMPLE3.GIF 29KB
I_117A4.GIF 28KB
I_117A3.GIF 25KB
I_231A2.GIF 23KB
EXAMPLE2.GIF 23KB
I_066A2.GIF 23KB
I_117A5.GIF 22KB
I_117A2.GIF 21KB
I_208B4.GIF 20KB
I_066A1.GIF 19KB
I_203A4.GIF 19KB
I_231A1.GIF 19KB
EXAMPLE1.GIF 19KB
I_199A4.GIF 18KB
I_208B3.GIF 18KB
I_124A4.GIF 18KB
I_208B5.GIF 17KB
I_203A3.GIF 17KB
I_117A1.GIF 17KB
I_050A4.GIF 17KB
I_050B4.GIF 17KB
I_208A4.GIF 17KB
I_040B4.GIF 16KB
I_199A5.GIF 16KB
I_203A5.GIF 16KB
IMAGE160.GIF 16KB
I_242A4.GIF 16KB
I_186A4.GIF 16KB
I_050B3.GIF 16KB
I_050B5.GIF 15KB
I_073A4.GIF 15KB
I_124A3.GIF 15KB
I_151A4.GIF 15KB
I_248A4.GIF 15KB
I_050A3.GIF 15KB
CO160.GIF 15KB
I_124A5.GIF 15KB
I_242A3.GIF 15KB
共 1820 条
- 1
- 2
- 3
- 4
- 5
- 6
- 19
资源评论
- 分钟人2018-01-18很不错的资料,谢谢
Christine2008
- 粉丝: 2
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功