Re: Type cast problem with VC++ 2005 Express Edition
aslan <aslanski2002@yahoo.com> wrote:
"Igor Tandetnik" <itandetnik@mvps.org>, iletisinde =FEunu yazd=FD,
news:ejWBQoqcKHA.4780@TK2MSFTNGP04.phx.gbl...
"aslan" <aslanski2002@yahoo.com> wrote in message
news:%23obrfjqcKHA.1028@TK2MSFTNGP06.phx.gbl...
It doesn't create any problem with the VC6 and runs OK. Yes it's
weird but believe it or not, memset doesn't write any random memory.
How do you determine that?
*** aslan *** Using debugger's memory window (I'm talking about
VC++6).
Well, this way you see that some memory is being written to. How do you =
know that this memory is actually properly allocated and owned by the =
vector object? After all, if you just take an uninitialized pointer and =
memset to it, then the memory window will show that the memory pointed =
to by this pointer is in fact initialized - but that doesn't make the =
program valid.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not =
necessarily a good idea. It is hard to be sure where they are going to =
land, and it could be dangerous sitting under them as they fly overhead. =
-- RFC 1925