⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mcack.htm

📁 一个非常适合初学者入门的有关c++的文档
💻 HTM
📖 第 1 页 / 共 2 页
字号:
</NOBR></P><A NAME="389"> </A>
<P><A NAME="dingp16"></A>
In <A HREF="./MC5_FR.HTM#5350" TARGET="_top">Item 26</A>, my design of a template class for counting objects is based on a posting to <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</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> by Jamshid <NOBR>Afshar.<SCRIPT>create_link(16);</SCRIPT>
</NOBR></P><A NAME="369"> </A>
<P><A NAME="dingp17"></A>
The idea of a mixin class to keep track of pointers from <CODE>operator</CODE> <CODE>new</CODE> (see <A HREF="./MC5_FR.HTM#22627" TARGET="_top">Item 27</A>) is based on a suggestion by Don Box. Steve Clamage made the idea practical by explaining how <CODE>dynamic_cast</CODE> can be used to find the beginning of memory for an <NOBR>object.<SCRIPT>create_link(17);</SCRIPT>
</NOBR></P><A NAME="3572"> </A>
<P><A NAME="dingp18"></A>
The discussion of smart pointers in <A HREF="./MC5_FR.HTM#61766" TARGET="_top">Item 28</A> is based in part on Steven Buroff's and Rob Murray's <I>C++ Oracle </I>column in the October 1993 <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</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>; on Daniel R. Edelson's classic paper, "Smart Pointers: They're Smart, but They're Not Pointers," in the proceedings of the 1992 <A NAME="pxiii"></A>USENIX C++ Conference; on section 15.9.1 of Bjarne Stroustrup's <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=desec" onMouseOver="self.status='The Design and Evolution of C++ Home Page'; return true" onMouseOut="self.status=self.defaultStatus" target="_top"><I>The</NOBR> Design and Evolution of C++</I></A> (see <a href="MCREADFR.HTM" target="_top">page 285</a>); on Gregory Colvin's "C++ Memory Management" class notes from C/C++ Solutions '95; and on Cay Horstmann's column in the March-April 1993 issue of the <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</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>. I developed some of the material myself, though. <NOBR>Really.<SCRIPT>create_link(18);</SCRIPT>
</NOBR></P><A NAME="317"> </A>
<P><A NAME="dingp19"></A>
In <A HREF="./MC5_FR.HTM#6073" TARGET="_top">Item 29</A>, the use of a base class to store reference counts and of smart pointers to manipulate those counts is based on Rob Murray's discussions of the same topics in sections 6.3.2 and 7.4.2, respectively, of his <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=cstrtac" onMouseOver="self.status='C++ Strategies and Tactics Home Page'; return true" onMouseOut="self.status=self.defaultStatus" target="_top"><I>C++</NOBR> Strategies and Tactics</I></A> (see page 286). The design for adding reference counting to existing classes follows that presented by Cay Horstmann in his March-April 1993 column in the <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</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(19);</SCRIPT>
</P><A NAME="411"> </A>
<P><A NAME="dingp20"></A>
In <A HREF="./MC5_FR.HTM#6074" TARGET="_top">Item 30</A>, my discussion of lvalue contexts is based on comments in Dan Saks' column in the C User's Journal <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=cuj" onMouseOver="self.status='C/C++ Users Journal Home Page'; return true" onMouseOut="self.status=self.defaultStatus" target="_top">C/C++</NOBR> Users Journal</A>) of January 1993. The observation that non-proxy member functions are unavailable when called through proxies comes from an unpublished paper by Cay <NOBR>Horstmann.<SCRIPT>create_link(20);</SCRIPT>
</NOBR></P><A NAME="622"> </A>
<P><A NAME="dingp21"></A>
The use of runtime type information to build vtbl-like arrays of function pointers (in <A HREF="./MC5_FR.HTM#34883" TARGET="_top">Item 31</A>) is based on ideas put forward by Bjarne Stroustrup in postings to <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</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 in section 13.8.1 of his <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=desec" onMouseOver="self.status='The Design and Evolution of C++ Home Page'; return true" onMouseOut="self.status=self.defaultStatus" target="_top">The</NOBR> Design and Evolution of C++</A> (see <a href="MCREADFR.HTM" target="_top">page 285</a>).<SCRIPT>create_link(21);</SCRIPT>
</NOBR></P><A NAME="171"> </A>
<P><A NAME="dingp22"></A>
The material in <A HREF="./MC6_FR.HTM#10947" TARGET="_top">Item 33</A> is based on several of my <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</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">C++</NOBR> Report</A> columns in 1994 and 1995. Those columns, in turn, included comments I received from Klaus Kreft about how to use <CODE>dynamic_cast</CODE> to implement a virtual <CODE>operator=</CODE> that detects arguments of the wrong <NOBR>type.<SCRIPT>create_link(22);</SCRIPT>
</NOBR></P><A NAME="600"> </A>
<P><A NAME="dingp23"></A>
Much of the material in <A HREF="./MC6_FR.HTM#33950" TARGET="_top">Item 34</A> was motivated by Steve Clamage's article, "Linking C++ with other languages," in the May 1992 <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</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">C++</NOBR> Report</A>. In that same Item, my treatment of the problems caused by functions like <CODE>strdup</CODE> was motivated by an anonymous <NOBR>reviewer.<SCRIPT>create_link(23);</SCRIPT>
</NOBR></p><P><A NAME="dingp24"></A><font ID="mititle">The Book</font><SCRIPT>create_link(24);</SCRIPT>
</P><A NAME="969"> </A>
<P><A NAME="dingp25"></A>
Reviewing draft copies of a book is hard &#151; and vitally important &#151; work. I am grateful that so many people were willing to invest their time and energy on my behalf. I am especially grateful to Jill Huchital, Tim Johnson, Brian Kernighan, Eric Nagler, and Chris Van Wyk, as they read the book (or large portions of it) more than once. In addition to these gluttons for punishment, complete drafts of the manuscript were read by Katrina Avery, Don Box, Steve Burkett, Tom Cargill, Tony Davis, Carolyn Duby, Bruce Eckel, Read Fleming, Cay Horstmann, James Kanze, Russ Paielli, Steve Rosenthal, Robin Rowe, Dan Saks, Chris Sells, Webb Stacy, Dave Swift, Steve Vinoski, and Fred Wild. Partial drafts were reviewed by Bob Beauchaine, Gerd Hoeren, <A NAME="pxiv"></A>Jeff Jackson, and Nancy L. Urbano. Each of these reviewers made comments that greatly improved the accuracy, utility, and presentation of the material you find <NOBR>here.<SCRIPT>create_link(25);</SCRIPT>
</NOBR></P><A NAME="2818"> </A>
<P><A NAME="dingp26"></A>
Once the book came out, I received corrections and suggestions from many people. I've listed these sharp-eyed readers in the order in which I received their missives: Luis Kida, John Potter, Tim Uttormark, Mike Fulkerson, Dan Saks, Wolfgang Glunz, Clovis Tondo, Michael Loftus, Liz Hanks, Wil Evers, Stefan Kuhlins, Jim McCracken, Alan Duchan, John Jacobsma, Ramesh Nagabushnam, Ed Willink, Kirk Swenson, Jack Reeves, Doug Schmidt, Tim Buchowski, Paul Chisholm, Andrew Klein, Eric Nagler, Jeffrey Smith, Sam Bent, Oleg Shteynbuk, Anton Doblmaier, Ulf Michaelis, Sekhar Muddana, Michael Baker, Yechiel Kimchi, David Papurt, Ian Haggard, Robert Schwartz, David Halpin, Graham Mark, David Barrett, Damian Kanarek, Ron Coutts, Lance Whitesel, Jon Lachelt, Cheryl Ferguson, Munir Mahmood, Klaus-Georg Adams, David Goh, Chris Morley, and Rainer Baumschlager. Their suggestions allowed me to improve <I>More Effective C++ </I>in updated printings (such as this one), and I greatly appreciate their <NOBR>help.<SCRIPT>create_link(26);</SCRIPT>
</NOBR></P><A NAME="2296"> </A>
<P><A NAME="dingp27"></A>
During preparation of this book, I faced many questions about the emerging <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=cstandard" onMouseOver="self.status='ISO/ANSI standard for C++'; return true" onMouseOut="self.status=self.defaultStatus" target="_top">ISO/ANSI</NOBR> standard for C++</A>, and I am grateful to Steve Clamage and Dan Saks for taking the time to respond to my incessant email <NOBR>queries.<SCRIPT>create_link(27);</SCRIPT>
</NOBR></P><A NAME="1947"> </A>
<P><A NAME="dingp28"></A>
John Max Skaller and Steve Rumsby conspired to get me the HTML for the draft ANSI C++ standard before it was widely available. Vivian Neou pointed me to the <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=ns" onMouseOver="self.status='Netscape Communicator Home Page'; return true" onMouseOut="self.status=self.defaultStatus" target="_top">Netscape</NOBR> WWW browser</A> as a stand-alone HTML viewer under (16 bit) Microsoft Windows, and I am deeply grateful to the folks at Netscape Communications for making their fine viewer freely available on such a pathetic excuse for an operating <NOBR>system.<SCRIPT>create_link(28);</SCRIPT>
</NOBR></P><A NAME="1165"> </A>
<P><A NAME="dingp29"></A>
Bryan Hobbs and Hachemi Zenad generously arranged to get me a copy of the internal engineering version of the <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=mw" onMouseOver="self.status='Metaware Home Page'; return true" onMouseOut="self.status=self.defaultStatus" target="_top">MetaWare</NOBR> C++ compiler</A> so I could check the code in this book using the latest features of the language. Cay Horstmann helped me get the compiler up and running in the very foreign world of DOS and DOS extenders. Borland (now <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=inp" onMouseOver="self.status='Inprise Home Page'; return true" onMouseOut="self.status=self.defaultStatus" target="_top">Inprise</A>)</NOBR> provided a beta copy of their most advanced compiler, and Eric Nagler and Chris Sells provided invaluable help in testing code for me on compilers to which I had no <NOBR>access.<SCRIPT>create_link(29);</SCRIPT>
</NOBR></P><A NAME="2009"> </A>
<P><A NAME="dingp30"></A>
Without the staff at the Corporate and Professional Publishing Division of Addison-Wesley, there would be no book, and I am indebted to Kim Dawley, Lana Langlois, Simone Payment, Marty Rabinowitz, Pradeepa Siva, John Wait, and the rest of the staff for their encouragement, patience, and help with the production of this <NOBR>work.<SCRIPT>create_link(30);</SCRIPT>
</NOBR></P><A NAME="2969"> </A>
<P><A NAME="dingp31"></A>
<A NAME="pxv"></A>Chris Guzikowski helped draft the back cover copy for this book, and Tim Johnson stole time from his research on low-temperature physics to critique later versions of that <NOBR>text.<SCRIPT>create_link(31);</SCRIPT>
</NOBR></P><A NAME="2970"> </A>
<P><A NAME="dingp32"></A>
Tom Cargill graciously agreed to make his <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</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> <A HREF="../MAGAZINE/CA_FRAME.HTM" onMouseOver="self.status='Exception Handling:  A False Sense of Security'; return true" onMouseOut="self.status=self.defaultStatus" TARGET="_top">article on exceptions</A> available.<SCRIPT>create_link(32);</SCRIPT>
</NOBR></p>
<P><A NAME="dingp33"></A><font ID="mititle">The People</font><SCRIPT>create_link(33);</SCRIPT>
</P>

<p><A NAME="dingp34"></A><A NAME="2813"> </A>
<P><A NAME="dingp34"></A>
Kathy Reed was responsible for my introduction to programming; surely she didn't deserve to have to put up with a kid like me. Donald French had faith in my ability to develop and present C++ teaching materials when I had no track record. He also introduced me to John Wait, my editor at Addison-Wesley, an act for which I will always be grateful. The triumvirate at Beaver Ridge &#151; Jayni Besaw, Lorri Fields, and Beth McKee &#151; provided untold entertainment on my breaks as I worked on the <NOBR>book.<SCRIPT>create_link(34);</SCRIPT>
</NOBR></P><A NAME="1760"> </A>
<P><A NAME="dingp35"></A>
My wife, Nancy L. Urbano, put up with me and put up with me and put up with me as I worked on the book, continued to work on the book, and kept working on the book. How many times did she hear me say we'd do something after the book was done? Now the book is done, and we will do those things. She amazes me. I love <NOBR>her.<SCRIPT>create_link(35);</SCRIPT>
</NOBR></P><A NAME="671"> </A>
<P><A NAME="dingp36"></A>
Finally, I must acknowledge our puppy, <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=pers" onMouseOver="self.status='Persephones Home Page'; return true" onMouseOut="self.status=self.defaultStatus" target="_top">Persephone</A>,</NOBR> whose existence changed our world forever. Without her, this book would have been finished both sooner and with less sleep deprivation, but also with substantially less comic <NOBR>relief.<SCRIPT>create_link(36);</SCRIPT>
</NOBR></p>

<DIV ALIGN="CENTER"><FONT SIZE="-1">Back to <A HREF="./MDED_FR.HTM" TARGET="_top">Dedication</A> &nbsp;&nbsp;<BR>&nbsp;&nbsp;Continue to <A HREF="./MCINTRFR.HTM" TARGET="_top">Introduction</A></FONT></DIV>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -