title: initializing aggregated members of a class
body: <p>I want to be able to initialize Seat inside of my method. I think I need to overload my '=' operator, but i am not sure.</p>
  
  <pre><code>void Ticket::setSize(Ticket ticket[], int a) {
     ticket[ticketCount].groupSize = a;
     ticket[ticketCount].seatInfo = new Seat[ticket[ticketCount].groupSize];
  }
  </code></pre>
  
  <p>This is my Ticket class below. I am calling setSize. and passing variables to initialize seatInfo in regards to the Ticket.groupSize. below are my Ticket and seat class</p>
  
  <pre><code>class Ticket {
      private:
          Seat * seatInfo;
      double totalPrice;
      string flightInfo;
      int ticketNumber;
      int groupSize;
  
      void countPrice();
      public:
          Ticket(Seat[], int, string);
  
      ~Ticket();
      void print();
      double getPrice();
      string toString();
      static int getTicketCount();
      static void setTicket(Ticket[], int);
      static void setSize(Ticket[], int);
      const Seat &amp; setSeat(Seat * );
      Seat &amp; operator = (Seat &amp; );
  }
  
  #endif
  </code></pre>
  
  <p>Seat.h</p>
  
  <pre><code>class Seat {
     private:
        int seatNumber;
     double price;
     const double BUSINESS_PRICE = 200.00;
     const double ECONOMIC_PRICE = 100.00;
     Person * reserver;
  
     bool isBusinessClass(int);
  
     public:
         // constructor
        Seat();
     Seat(int, int, Person * );
     Seat(int, double, Person * );
  }
  </code></pre>
  
  <p>Errors I'm getting are no constructor that can do it. and no '=' operator function. If you need more info please let me know</p>