Re: initialize array within a class by a class member



I figured out

You use double pointers
lDate **dateArray;

then assign array size in constructor

dateArray = (new Date*[NoOfDays]);

if you do not know how, please do not give excuses.

Thanks!

Greg

.



Relevant Pages

  • Re: Sorting records using sort()
    ... > We have an array of n*m bytes. ... > proxy objects store a pointer to some master descriptor that stores the ... > need a default constructor, the value type needs to be assignable only ...
    (comp.lang.cpp)
  • Re: Create objects using dynamic class names
    ... classes from a common base class and have an array of class references ... Not necessarily an open array, although that neatly coalesces the steps ... The constructor of the base class can only construct an instance of the ... TPageClass = class of TPage; ...
    (comp.lang.pascal.delphi.misc)
  • Re: Create objects using dynamic class names
    ... classes from a common base class and have an array of class references ... Not necessarily an open array, although that neatly coalesces the steps ... The constructor of the base class can only construct an instance of the ... TPageClass = class of TPage; ...
    (comp.lang.pascal.delphi.misc)
  • Create object from type
    ... Int32 y = Read; ... a type because I am working with an array and I had to use GetElements to ... is of type string then everythign works. ... Activator.CreateInstance but I get errors about the constructor. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Question about arrays in objects
    ... >>I want to create a 2d array as an object member. ... > handled in the constructor, you just can't use a plain old array. ... > that is where using a pointer would come in. ...
    (alt.comp.lang.learn.c-cpp)