C++: Read a word from standard input and find out its length?
<p>I want to read a word from standard input and then find out its length in C++. I am currently using:</p>

<pre><code>char str[80];
cout &lt;&lt; "Enter your word: " &lt;&lt; endl;
scanf("%s", str);
</code></pre>

<p>but cannot get the length of the word read in.</p>

<p>How do I do this?</p>

<p>Thanks.</p>
