title: C++ error using Xcode
body: <p>I get an error on my code below in the else: control reaches end of non-void function?</p>
  
  <pre><code>double arrival(double x){
  
      x=temp-&gt;sim_time;
      e=temp-&gt;eventtype;
  
      insert_nextevent((x+ (-log(rand())/lamda)), 'A');
  
      if(server ==0){
          server =1;
          insert_nextevent((x +(-log(rand())/mu)), 'D');
      }
  
      else{
  
              numqueue++;
      }
  
  }
  
  double departure(double x){
  
      x=temp-&gt;sim_time;
      e=temp-&gt;eventtype;
  
      if(numqueue==0){
              server =1;
      }
      else {
              numqueue--;
              insert_nextevent((x+ (-log(rand())/mu)), 'D');
      }
  
  }
  </code></pre>