What is wrong here? Error: cannot cast int to SYSTEMTIME
BCS
ao at pathlink.com
Tue Oct 23 12:41:00 PDT 2007
Reply to Spacen,
> BCS wrote:
>
>> For the first line, do this:
>>
>> utc_time1 = std.date.getUTCtime();
>> static this(){long utc_time1 = std.date.getUTCtime();}
>> For the second drop the static (if it isn't actualy in main, you will
>> have to do somthing else)
>>
>> The issue is that D doesn't allow runtime initializers for non stack
>> variables.
>>
>
> Ah ok. I need to read up on this. The code I was intending to use in
> that manner was for testing. Presumably the way is to create a class
> and use objects.
>
What do objects have to do with it? I might not be understanding what you
want to do.
> Thanks for the assistance.
>
More information about the Digitalmars-d-learn
mailing list