title: How do I assign a string to an int variable?
body: <p>I'm making a Card and Deck program and I am a bit confused on how to implement a feature in the constructor to make the Card Rank equal to "Ace" "Jack" "King" "Queen" etc. depending on the number.</p>
  
  <pre><code>Card::Card(char suiter, int ranker) {
      suit = suiter;
      rank = ranker;
      if (rank == 1) {
          rank = "Ace";   //Assign rank to "Ace" if the number equals 1
      }
  }
  </code></pre>