Initializing String Class Member at Creation (David and Ann Borger ) wrote:

>I'm trying to construct what I thought was a very simple class but am
>getting a GP Fault at run time.  The class (still under development)
>looks like:
>  TSupervisor = class
>  private
>    location : String;
>  public
>    constructor Create(path : String);
>    destructor Destroy;

- snip -

>In my main program I have
>  ms : TSupervisor;
>  ms.Create('c:\test');
>And the GP Fault occurs where indicated above.  Any ideas?

Sure. The constructor is a function which allocates memory for and
returns a reference to the object being constructed. What you need is:


Steve Austin