Struct life time

Qian Xu quian.xu at stud.tu-ilmenau.de
Sun Dec 14 12:19:27 PST 2008


BCS wrote:
> Reply to Qian,
> 
>> Hi All,
>>
>> I am new to D community. I have some problems with TimeOfDay struct.
>>
>> I have defined a class:
>> ========================================================
>> class Test
>> {
>> TimeOfDay* getTime() {
>> return a_valid_timeofday_pointer;
>> }
> 
> Could you expand on this function? The rest looks good but if this 
> function is returning a pointer to something that then goes out of scope 
> (a local var for instance) than that would be the bug.
> 
Thanks BCS, I am not able to get my own code right now. I will post it 
tomorrow.


-- 
Xu, Qian (stanleyxu)
  http://stanleyxu2005.blogspot.com


More information about the Digitalmars-d-learn mailing list