title: no viable overloaded '='
body: <p>I'm taking a simulation course in C++ right now, and am getting the clang++ error quoted in the title. I was hoping someone could tell me why because I cannot seem to find a similar error for a similar situation anywhere (search as I may). </p>
  
  <p>The error occurs for each <code>Office*</code> variable definition (lines 187 to 190).</p>
  
  <pre><code>175 class EventHandler {
  176 
  177     private:
  178     double simulation_time;    // current simulation time
  179     Office* aid, bursar, registrar, parking;
  180     Event* current_event;
  181     MinHeap* time_heap;
  182 
  183     public:
  184 
  185     void initialize_simulation() {  // initializes simulation time, offices, and event handler (time_heap)
  186         simulation_time = 0;
  187         aid = new Office(8, Tf);    // initializes financial aid office with Tf tellers, with serve time exponentially distributed with mean of 8 minutes
  188         bursar = new Office(15, Tb);     // initializes bursar office w/ Tb tellers, exp distro, mean 15 min
  189         registrar = new Office(5, Tr);    // registrar w/ Tr tellers, exp distro, mean 5 min
  190         parking = new Office(10,Tp);       // parking office w/ Tp tellers, exp distro, mean 10
  192         MinHeap* time_heap = new MinHeap();
  193     }
  </code></pre>
  
  <p>If I replace the <code>Office* aid</code> declaration (for instance), and change <code>aid = new Office(15, Tf)</code> to <code>Office* aid = new Office(15, Tf)</code>, the error goes away. I have no idea why, and would very much like to, because I want all of these class pointers to be <code>private</code>.</p>
  
  <p>Interestingly (irritatingly?), the <code>MinHeap* time_heap; time_heap = new MinHeap();</code> does not cause any problems. I thought it may have to do with declaring a pointer var as <code>private</code>  then defining it in the <code>public</code> portion of the class but it looks like no.</p>
  
  <p>help? =|</p>