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

📄 intro.htm

📁 高效c++编程
💻 HTM
📖 第 1 页 / 共 4 页
字号:
<P><A NAME="AUTO00048"></A><A NAME="dingp58"></A>The flip side to the links on the CD is your ability to create links <I>into</I> the material on the CD. For example, suppose you'd like to create links from your corporate coding guidelines to some of my books' Items. That's easy to do, because each Item in each copy of each book (see above for information on <A HREF="#chunk" onMouseOver = "self.status = 'Link to selecting a preferred chunk size'; return true" onMouseOut = "self.status = self.defaultStatus">selecting a preferred chunk size</A>) is preceded by an HTML anchor (i.e., <CODE>&lt;a&gt;</CODE> tag). Such anchors are not enough,
however, because sometimes you'd like to link to material in the middle of an
Item. <SCRIPT>sendmetoo(28,61766,'M');</SCRIPT> onMouseOver = "self.status = 'Link to Item 28 of More Effective C++'; return true" onMouseOut = "self.status = self.defaultStatus">Item M28</A> on
Smart Pointers, for example, covers more than 20 pages in the printed book,
so you might want to create a link that leads specifically to my discussion
of <SCRIPT>sendmetoo(28,61982,'M');</SCRIPT> onMouseOver = "self.status = 'How to emulate inheritance-based implicit type conversions among smart pointer types'; return true" onMouseOut = "self.status = self.defaultStatus">how to emulate inheritance-based implicit type conversions among smart pointer types</a>. I address that topic over halfway through the Item, and it's reasonable to want to jump directly to that discussion.<SCRIPT>create_link(58);</SCRIPT>

</P>

<P><A NAME="AUTO00050"></A><A NAME="dingp59"></A> To facilitate the
creation of such links, each <I>paragraph</I> on this CD &#151; whether in
a book, a magazine article, or a document such as this &#151; has an associated HTML
anchor. (By "paragraph" here, I include Item titles, section headings, entries in tables of contents, etc.) That means you can create a link to any
paragraph you like. To do it, however, you need to know the URL for each
paragraph, and we've made getting that information easy.<SCRIPT>create_link(59);</SCRIPT>

</P>

<P><A NAME="dingp60"></A>
<A NAME="dingbatSymbol"></A> You've doubtless noticed the odd-looking
 <script>document.write(ding);</SCRIPT> symbol at the end of each paragraph in this document. Every
paragraph on the CD ends with one, and each paragraph's <SCRIPT>document.write(ding);</SCRIPT> is a link
to the beginning of that paragraph.  Clicking on a <SCRIPT>document.write(ding);</SCRIPT> thus jumps you
to the beginning of the paragraph.  That's not really why it exists,
however (although it does provide a convenient way to skim forward a few paragraphs at a time &#151; try it). Rather, it exists to make it easy to obtain the paragraph's unique URL.<SCRIPT>create_link(60);</SCRIPT>

</P>

<P><A NAME="dingp61"></A>
To discover the URL for a particular paragraph, move your cursor over that
paragraph's <SCRIPT>document.write(ding);</SCRIPT>, then use your browser to copy the corresponding URL
to the clipboard.  (In Netscape Navigator, you do this by right-clicking
the <SCRIPT>document.write(ding);</SCRIPT> and selecting "Copy Link Location." Using Internet Explorer,
you right-click the text that pops up when you move your cursor over the <SCRIPT>document.write(ding);</SCRIPT>, then select "Copy Shortcut." If you're on a Mac, you click-hold rather than right-click.)  Once the paragraph's URL is on the clipboard, you can paste it into other HTML
documents, and &#151; shazaam! &#151 you're linked to the paragraph. Diagrams and code examples lack <SCRIPT>document.write(ding);</SCRIPT> symbols, so to link to one of those, just link to the preceding paragraph.<SCRIPT>create_link(61);</SCRIPT>

</P>

<A NAME="bookmarks"></A><P> <A NAME="AUTO00051"></A>
<A NAME="dingp62"></A><P>You'll need to use the <SCRIPT>document.write(ding);</SCRIPT> symbols to create bookmarks,
too, because your browser's standard bookmarking capability is, frankly,
unreliable.  That is, the usual "Add Bookmark" or "Add to Favorites"
command will frequently <I>not</I> do what you want.  The reasons for this
are many and varied,<A HREF="#bookmarkFootnote" onMouseOver = "self.status = 'Link to Footnote 2'; return true" onMouseOut = "self.status = self.defaultStatus"><SUP>2</SUP></A> but the bottom
line is that use of your browser's standard bookmarking command can only
lead to frustration and disappointment.<SCRIPT>create_link(62);</SCRIPT>

</P>

<P><A NAME="dingp63"> </A> 
  Nonetheless, bookmarking is a crucial capability, so the CD supports an
  alternative mechanism that <I>does</I> work.  When you move your cursor
  over a paragraph's <SCRIPT>document.write(ding);</SCRIPT>, a textual
  identification of the paragraph will automatically appear. This text is the
  bookmark description that will be generated if you bookmark that paragraph.
  For example, if you move your cursor over the
  <SCRIPT>document.write(ding);</SCRIPT> at the end of this paragraph, you'll
  see "CD Intro, P63" appear after the <SCRIPT>document.write(ding);</SCRIPT>.
  (The "P63" indicates that this is the 63rd paragraph in this
  document.)<SCRIPT>create_link(63);</SCRIPT>

  </P>
  
  <P><A NAME="dingp64"></A>
  If you're using Netscape Navigator, you bookmark a paragraph by
  <b>right-clicking</b> (or, on a Mac, <b>click-holding</b>) on the
  <em>textual description</em> following the paragraph's
  <SCRIPT>document.write(ding);</SCRIPT> (<em>not</em> on the
  <SCRIPT>document.write(ding);</SCRIPT> itself!), then selecting "Add
  Bookmark" from the resulting pop-up menu. If you're using Internet
  Explorer, you drag the paragraph description (the one that appears when you
  move your cursor over the paragraph's
  <SCRIPT>document.write(ding);</SCRIPT>) to your "Favorites" menu. Once you
  get used to it, you'll wish all web sites offered this kind of reliable,
  fine-grained control over bookmarking.<SCRIPT>create_link(64);</SCRIPT>

  </P>

</P>

<A NAME="AUTO00052"><P></A><A NAME="dingp65"></A><P>Because links and bookmarks refer to specific files, they take no notice of your <A HREF="#chunk" onMouseOver = "self.status = 'Link to chunk size preference'; return true" onMouseOut = "self.status = self.defaultStatus">chunk size preference</A>. As a result, if you're using <A HREF="#chap" onMouseOver = "self.status = 'Link to Chapter-length chunking'; return true" onMouseOut = "self.status = self.defaultStatus">Chapter-length chunking</A> while viewing <I>Effective C++</I> and you create a link to or set a bookmark at, say, the third paragraph of Item 44, following that link or jumping to that bookmark will always take you to a Chapter-length file, even if you've since switched to Item-length or Book-length chunking. Oh well.<SCRIPT>create_link(65);</SCRIPT>

</P>

<P>
<A NAME="annotations"></A>
<!-- subhead -->
<FONT ID="iititle"><A NAME="dingp66"></A>Annotating the CD (Sort Of)</FONT><SCRIPT>create_link(66);</SCRIPT>

</P>

<P><A NAME="dingp67"></A>
Wouldn't it be great if you could add your own comments to the material on
this CD?  Sure it would.  Alas, the "RO" in "CD-ROM" stands for
"Read-Only," so modifying the files on the disc is tough.  Furthermore,
most web browsers are just that, <I>browsers</I>.  They view web pages,
they don't edit them.  Of course, if you've chosen to <A HREF="#run" onMouseOver = "self.status = 'Link to copy this CD to a hard drive'; return true" onMouseOut = "self.status = self.defaultStatus">copy this CD to a hard drive</A> and if your web browser offers editing
capabilities, you can modify the files in any way you choose.  Still, the fact remains that, generally speaking, annotating the CD borders on the impossible.<SCRIPT>create_link(67);</SCRIPT>

</P>

<P><A NAME="dingp68"></A>
I don't know how to cross that border, but here's one way to lean heavily
against it.  Create an HTML document containing the annotations you'd like
to add to the CD.  Using the <A HREF="#dingbatSymbol" onMouseOver = "self.status = 'Link to paragraph specific bookmarking'; return true" onMouseOut = "self.status = self.defaultStatus">paragraph-specific bookmarking</A> capability described above, link each annotation to the paragraph to which it pertains. This is far from perfect, but it's better
than nothing, and remember, those of us working on the CD are wrestling
with a read-only medium and the constraints of the most popular browsers.
Trust me when I tell you we're trying as hard as we can.<SCRIPT>create_link(68);</SCRIPT>

</P>

<P>
<A NAME="run"></A>
<!-- subhead --><FONT ID="iititle"><A NAME="dingp69"></A>Running Off a Hard Drive</FONT><SCRIPT>create_link(69);</SCRIPT>

</P>

<P><A NAME="AUTO00054"></A><A NAME="dingp70"></A>
If you'd prefer to access the material on this CD from a hard drive, all you need to do is copy the files over. Be sure to preserve the directory structure during the copy. You can then invoke your browser on the copy of <CODE>INDEX.HTM</CODE> on your hard drive, and everything will work as if you were running off the CD.<SCRIPT>create_link(70);</SCRIPT>

</P>

<A NAME="ack"></A><P>
<!-- subhead --><FONT ID="iititle"><A NAME="dingp71"></A>Acknowledgments</FONT><SCRIPT>create_link(71);</SCRIPT>

</P>

<p><A NAME="dingp72"></A>
If it takes a village to make a CD, among the more prominent villagers behind this disc are my colleagues at Addison-Wesley: Jason Jones, Marty Rabinowitz, John Wait, and Sarah Weaver. For months the five of us have debated design alternatives, wrestled with implementation difficulties, reviewed prototypes, plotted strategy, and otherwise laid siege to a project that too often resembled a <nobr><FONT COLOR="#FF0000" SIZE="-2"><B>&deg;</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=fiftymonster" ONMOUSEOVER="self.status='Fifty-headed hundred-handed monster'; return true" ONMOUSEOUT="self.status=self.defaultStatus" TARGET="_top">fifty</nobr>-headed hundred-handed monster</a>. Others at AW contributed to the project, but Jason, Marty, John, and Sarah were there on the front lines every day 

⌨️ 快捷键说明

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