Random ascii char's appearing
<p>I was trying to write a program that stores the message in a string backwards into a character array, and whenever I run it sometimes it successfully writes it backwards but other times it will add random characters to the end like this:</p>

<p>input: write this backwards</p>

<p>sdrawkcab siht etirwˇ</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
using namespace std;

int main()
{
 string message;
 getline(cin, message);
 int howLong = message.length() - 1;
 char reverse[howLong];
 for(int spot = 0; howLong &gt;= 0; howLong--)
 {
   reverse[spot] = message.at(howLong);
   spot++;
 }
 cout &lt;&lt; reverse;
 return 0;
}
</code></pre>
