How do you compare two strings in c++?
<p>These functions output strings, and the std::cout shows they are visually and ascii  numerically equivalent. If the input is 'Hi! bye...', it prints 'hibye true &lt;- -> reverse eybih'. Therefore, a palindrome with capitals and symbols would create two equivalent strings. A '.compare', and some experimentation, showed that true_sentence is considered '>' than the reverse_string.</p>

<pre><code>std::string true_sentence = strip_string(in_string);

std::string reverse_sentence = reverse_string(true_sentence);

std::cout &lt;&lt; true_sentence &lt;&lt; " true &lt;-  -&gt; reverse " &lt;&lt; reverse_sentence &lt;&lt; "\n";

if(true_sentence == reverse_sentence){

    std::cout &lt;&lt; "This IS a palindrome: \n";
}

else{

    std::cout &lt;&lt; "This is NOT a palindrome: \n";
}
</code></pre>
