Re: Anyone knows what can be cause of this problem?

From: Andrey Tarasevich (
Date: 02/20/04

Date: Thu, 19 Feb 2004 19:05:41 -0800

Karl Heinz Buchegger wrote:
>> ...
>> Even if he was memsetting Date he's likely to get into problems. The
>> idiom of initializing by memsetting C type structures seems to a MS
>> thing, which doesn't work with C++ structs and classes where you are
>> likely to zap the vtable pointer.
> true.
> But the OP used a POD struct.
> memsetting to 0 should not be a problem in this case.
> ...

No, it is still a problem. You must be thinking about 'memcpy', not
about 'memset'. Strictly speaking, 'memset' cannot be used to
zero-initialize 'int' objects. And 'int' objects is exactly what the OP
is storing in his/her POD struct called 'date_struct'.

Best regards,
Andrey Tarasevich