The memset() function
<p>I am a beginner to C/C++, and I came across the following segment of code:</p>

<pre><code>#define MAX_MSG 1000
char *szBuf = new char[MAX_MSG];
char *szBufRaw = new char[MAX_MSG];
memset(szBuf, ‘\0’, strlen(szBuf));
memset(szBufRaw, ‘\0’, strlen(szBufRaw));
</code></pre>

<p>I've read the tutorial about memset here:</p>

<p><a href="http://www.java-samples.com/showtutorial.php?tutorialid=591" rel="nofollow">http://www.java-samples.com/showtutorial.php?tutorialid=591</a></p>

<p>and I believe the above code is correct, but the original author of the code believes there is a bug within it, could anybody give me a hint?
Thanks in advance.</p>
