title: C++ program to check if a given string is a palindrome
body: <p>The problem here is that it can't be a string from user input. There are 7 strings, 6 of them are numbers and one is a word "abba". I have so far written much of the code but I'm having trouble finding a way to test the 7 strings that I must use for the program.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  #include &lt;cmath&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  bool isNumPalindrome(string str);
  
  int main ()
  {
      string str;
      str = "10", "32", "222", "abba", "444244", "67867876", "123454321";
      int userExit;
  
      bool isNum = isNumPalindrome;
  
      if (isNumPalindrome)
      {
          cout &lt;&lt; str &lt;&lt; " is a palindrome";
          cout &lt;&lt; endl;
      }
      else
      {
          cout &lt;&lt; str &lt;&lt; " is not a palindrome";
          cout &lt;&lt; endl;
      }
  
      cout &lt;&lt; "Press any key to exit: ";
      cin &gt;&gt; userExit;
      cout &lt;&lt; endl;
  
      return 0;
  }
  
  bool isNumPalindrome(string str)
  {
      int length = str.length();
  
      for (int i = 0; i &lt; length / 2; i++)
          if (str[i] != str[length - 1 - i])
              return false;
  
          return true;
  }
  </code></pre>
  
  <p>As you can see, I haven't quite figured out <strong>how to perform a function in main to take the return and output a statement.</strong> I need to find out how to test multiple strings, and then how to use the return statement to print something like <code>cout &lt;&lt; str &lt;&lt; "</code> is not a palindrome.";</p>