How can I initialize an array in a constructor

There are two class.How can I initialize an array of different class in a constructor?
class Ticket{
int ID;
double price;
bool available;
int getID();
double getPrice();

void setID(int);
void setPrice(double);
bool status();
void setAvailable();
void buy();

class Cinema{
Ticket ticket[50];
double purchaseTicket(int);
void listAll();
Both classes are given.
I have to provide a no-argument constructor (Cinema();)to initialize the ticket array and give the right ticket ID.

Please help~
Last edited on
you don't need to initialize the ticket class inside the cinema, just initialize ticket in it's own class as you want and it will get initialized automatically when you create an object of cinema
Topic archived. No new replies allowed.