Hallo, On Sat, 25 Jan 2003 at 15:45 (+0100), Bastian Schern wrote:
Bernhard Walle schrieb: [...]
Und beachte auch folgenden Abschnitt in der Manpage:
In principle, this function does not initialize tm but only stores the values specified. This means that tm should be initialized before the call. Details differ a bit between different Unix systems. The GNU libc imple mentation does not touch those fields which are not explicitly specified, except that it recomputes the tm_wday and tm_yday field if any of the year, month, or day elements changed.
Genügt das als Initialisierung? struct tm tm = { 0 };
Mein Compiler akzeptiert das gar nicht. Habe ich auch noch nie gesehen.
Normalerweise funktioniert diese Art der Initialisierung nur bei Arrays
und hier wurde es auch nur Sinn machen, wenn zwischen den geschweiften
Klammern mehrere Elemente stehen wuerden.
Ich wuerde stattdessen folgendes machen:
#include