initialize array within a class by a class member



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

.



Relevant Pages

  • regex - no field seperator
    ... I have the following data that I'm trying to parse into an array. ... Thanks Greg. ... Prev by Date: ...
    (perl.beginners)
  • Re: initialize array within a class by a class member
    ... When we initialze a month, we know the no of dates in that month, so ... base on that we can create a array of the right size for each date of ... Greg ... Prev by Date: ...
    (microsoft.public.vc.language)
  • Re: Vinum raid5 problems......
    ... Greg 'groggy' Lehey wrote: ... and then allow me to traverse the array. ... Vinum List: ... Kernel dumps will be supplied later today or tomorrow - i'm not going to ...
    (freebsd-questions)
  • Re: Looking for speed performance to draw line.
    ... each item in an array, that being the next and/or previous indexes. ... and it's next pointer to the previous item's original next pointer. ... Next -1, Prev 0 ... shapes up into shape classes that implemented the required commands ...
    (microsoft.public.vb.winapi.graphics)
  • Re: Man in the middle
    ... my misinterpretation of the error made me think it didn't work with an array ... came up empty on the Median function. ... arguments can be array names as well as an explicit list. ... Probably shouldn't advise something based on knowing nothing about it. ...
    (microsoft.public.excel.programming)

Loading