title: Accept only Alphabet/Letters for input of a variable, reprompt if not letters
body: <p>I've been stuck on this for two days. I've searched through page 20 on google and can't figure this out.</p>
  
  <p>I need to accept only alphabetical letters for the input on <code>townName</code>.</p>
  
  <p>I've tried every way of looping (that I can think of or find). Also, I've read that <code>isalpha()</code> only works on characters. However, I've searched for and implemented ways to convert a string from input to characters, I'm just not getting anywhere.</p>
  
  <p>This is my last attempt:</p>
  
  <pre><code>// Input, validate, and set string name of town 
  cout &lt;&lt; "Enter name of town: "; 
  getline(cin, townName); 
  cin &gt;&gt; townName; cin.ignore();
  
  while (townName != isalpha()) {
      cout &lt;&lt; "Enter the town name - alphabet only.";
      cin &gt;&gt; townName; }
  </code></pre>
  
  <p>I'm aware now that is not the proper use of <code>isalpha</code>. I've also tried <code>isalpha(townName)</code>, using bools but I need to return a prompt to re-enter if it contains anything other than alpha/white space, and if it's only alpha to continue with main.</p>