Exercise Self Study Help
<p>I've started learning C++ and am working through some exercises in the C++ Primer Plus book.</p>

<p>In chapter 5 one of the exercises is: </p>

<blockquote>
  <p>Write a program that uses an array of
  char and a loop to read one word at a
  time until the word done is entered.
  The program should then report the
  number of words entered (not counting
  done). A sample run could look like this: </p>

<pre><code>Enter words (to stop, type the word done):
anteater birthday category dumpster
envy finagle geometry done for sure
You entered a total of 7 words.
</code></pre>
  
  <p>You should include the cstring header
  file and use the strcmp() function to
  make the comparison test.</p>
</blockquote>

<p>Having a hard time figuring this out. It would be much easier if I could use if statements and logical operators but I'm restricted to using only:</p>

<ol>
<li>Loops</li>
<li>Relational Expressions</li>
<li>char arrays</li>
</ol>

<p>Branching statments (ie if, case/switch ) and logical operators are not allowed.</p>

<p>Can anyone give me hints to push me in the right direction?</p>

<p>Edit: Clarification. The input must be one string. So, several words for one input.</p>
