I have a question about retrieving the system date/time ... i can't seem to get it to work and i am unsure why...
here is some code i've tried..
however the cpu brings up the crash dialog box to send info to MICROSOFT...(yeah like i'm gonna do that.. ) and if i try and output the structure to the screen nothing is outputed..Code:#include <windows.h> int main() { LPSYSTEMTIME time = NULL; GetSystemTime(time); return 0; } && int main() { SYSTEMTIME *time = NULL; GetSystemTime(time); return 0; }
i coulda swore that i tried this same code under windows 98 and it worked fine.. however i can not try because i don't have win 98 at my current location , just winXP...Code:EX: cout << time.wYear or time->wYear;
what's goin' on? MSDN says this should work under winXP... i think there may be problems with kernel32.lib but i cannot be sure.. any ideas? anyone know any other time functions to use? i need to retrieve the date (month/day/year)