title: How to do Random Array with Strings?
body: <p>I hope this is a very simple question, but how can you random a string within a array</p>
  
  <p>For example, for vaules ill do this </p>
  
  <p>`</p>
  
  <pre><code>#include &lt;cstdlib&gt; 
  #include &lt;iostream&gt;
  using namespace std;
  int main() 
  {
  srand ( time(NULL) ); //initialize the random seed
  
  
  const char arrayNum[4] = {'1', '3', '7', '9'};
  
  int RandIndex = rand() % 4;
  int RandIndex_2 = rand() % 4;
  int RandIndex_3 = rand() % 4;
  int RandIndex_4 = rand() % 4; //generates a random number between 0 and 3
  
  cout &lt;&lt; arrayNum[RandIndex] &lt;&lt; endl;;
  system("PAUSE");
  return 0;
  }    `
  </code></pre>
  
  <p>how can i apply this if there is string within the arraynum</p>
  
  <p>I have come across something like this in my serach for an answer though</p>
  
  <pre><code>std::string textArray[4] = {"Cake", "Toast", "Butter", "Jelly"};
  </code></pre>
  
  <p>but all I come across is a hex answer which does not change on it's own. so therefore I am going to assume it is probably not even randomized.</p>