title: can someone help figure out this error?? (C++)
body: <p>Getting this error when compiling:</p>
  
  <p>horserace.cpp:32:22: error: expected ‘,’ or ‘;’ before ‘{’ token
   string coinflip0(h0) {
                        ^</p>
  
  <p>Here's my code (currently trying to gt the first 'horse' to run):</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;time.h&gt;
  #include &lt;stdlib.h&gt;
  using namespace std;
  
  string h0 = "0................";
  string h1 = "1................";
  string h2 = "2................";
  string h3 = "3................";
  string h4 = "4................";
  
  string coinflip0(h0);
  int main(){
     cout &lt;&lt; "Press Enter to begin! " &lt;&lt;endl;
     cin.ignore();
     std::cout &lt;&lt; h0 &lt;&lt; endl;
    // bool keepgoing = true;
  //      srand(time(NULL));//time goes back to zero for each loop
    // while(keepgoing){
  //      for(int num=0; num&lt;5; num++){
  
  //      } // end for
    // } // end while
  
     cout &lt;&lt; "\n Press Enter to continue " &lt;&lt; endl;
     cin.ignore();
     cout &lt;&lt; endl;
     string coinflip0(h0);
     cout &lt;&lt; h0 &lt;&lt; endl;
  } // end main
  
  string coinflip0(h0){
  
     int position = 0; // current position of horse
  
     // find random number(0 or 1)
     int num = rand() % 2;
     position = position + num;
  
     if(num==1){
          std::swap(h0[position], h0[position+1]);
     return string h0;
     } // end if
  }//end coin flip
  </code></pre>