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

📄 slide036.html

📁 《Big C++ 》Third Edition电子书和代码全集-Part1
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<meta content="blendTrans(Duration=2)" http-equiv="Page-Enter">
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="Copyright" content="2005 John Wiley & Sons">
  <meta name="Author" content="Kurt Schmidt">
	<script language="JavaScript" src="./config.js"></script>
	<script language="JavaScript" src="./pageFormat.js"></script>
	<script><!-- // Set title on page
		title()
	//--></script>
</head>


<body>
<div onclick="document.location='slide037.html'">
<h2><font color="#009999">23.4 Sets - Dictionary Example</font></h2>
<font size="+1">

<p>Program to check for misspelled words.  A dictionary is read
	into a set, then checks input words against the set.</p>

<blockquote>
<pre>void spellCheck(istream&amp; dictionary, istream&amp; text)
{
   set&lt;string&gt; words;
   string word;

   // First put all words from dictionary into set.
   while (dictionary &gt;&gt; word)
      words.insert(word);

   // Then read words from text
   while (text &gt;&gt; word)
      if (words.count(word) == 0)
         cout &lt;&lt; "Misspelled word " &lt;&lt; word &lt;&lt; "\n";
}</pre>
</blockquote>

</font>

<hr>
<center><small>
	<a href='slide035.html'>prev</a>
	|<a href='slide001.html'>top</a>
	|<a href='slide037.html'>next</a>
</small></center>
</div>
</body>
</html>

⌨️ 快捷键说明

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