CTime causes exceptions
-
A call to any CTime member function causes unhandled exceptions, access violation. Any ideas why?
-
A call to any CTime member function causes unhandled exceptions, access violation. Any ideas why?
Daniel1324 wrote: Any ideas why? Not without a code snippet that exhibits the problem.
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
-
Daniel1324 wrote: Any ideas why? Not without a code snippet that exhibits the problem.
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
CTime t; t.GetYear();
-
CTime t; t.GetYear();
Daniel1324 wrote: CTime t; t.GetYear(); What year would that be then?:sigh: t is unitialised and has no valid data so it goes crash bang wallop when you try to use it:doh: See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_ctime.3a3a.ctime.asp[^] John Hudson Megan Forbes after having cage slightly rattled: Grrrrrrr....:baaaa!: humbug I say!:omg: JohnJ makes a note to wear protective clothing/goggles next time;P http://www.rainbow-innov.co.uk[^]
-
CTime t; t.GetYear();
I'm curious what you expected to come from an uninitialized object? Even though
CTime::GetYear()
is dereferencing a NULL pointer, it doesn't make sense that you'd assume valid data would be returned.
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
-
I'm curious what you expected to come from an uninitialized object? Even though
CTime::GetYear()
is dereferencing a NULL pointer, it doesn't make sense that you'd assume valid data would be returned.
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
My fault. I was assuming that it would return date and time stored in the system.