initialize array within a class by a class member
- From: "greg" <greg_chu@xxxxxxxxxx>
- Date: 30 Jan 2006 21:14:22 -0800
I have a class date
Date
{
public:
char sDate;
int nDate;
Date();
virtual ~Date();
};
and a class month
class Month
{
public:
int noofdates;
Date dateArray [noofdates];
lMonth();
virtual ~Month();
};
I want to define an array of class Date based on another member
variable no of dates (could be 28, 29, 30, 31) in class month.
How do I initialize the dateArray in without knowing no of dates?
Thanks!
Greg
.
- Follow-Ups:
- Re: initialize array within a class by a class member
- From: Victor Bazarov
- Re: initialize array within a class by a class member
- Prev by Date: Re: Size of array's dimensions
- Next by Date: Re: initialize array within a class by a class member
- Previous by thread: Re: Size of array's dimensions
- Next by thread: Re: initialize array within a class by a class member
- Index(es):
Relevant Pages
|
Loading