VC 服务程序里,怎样获得当前系统时间?我用 struct time t,CTime 都说没有定义,他们的头文件是什么?谢谢~~~

解决方案 »

  1.   

    SYSTEMTIME st;
    GetLocalTime(&st);
      

  2.   

    include <time.h> 也不可以~~~
      

  3.   

    snollow(坐井观蛙):我的程序里已经包含了下面的文件
    #include <stdio.h>
    #include <windows.h>
    #include <winbase.h>
    #include <winsvc.h>加上 #include <afx.h> 这个头文件的时候报错,说 windows.h 已经包含,必须去掉
    该怎么做???谢谢~~~~
      

  4.   

    #include <afx.h> 把他调换一下位置,摆在前面。