Red de conocimiento informático - Problemas con los teléfonos móviles - Código fuente de Swprintfs

Código fuente de Swprintfs

# include & ltiostream & gt

# include & ltwindows.h & gt

Usar espacio de nombres std

void main()

{

SYSTEMTIME time; // Declaración de estructura de tiempo, esta estructura es el sistema,

getsystem time(& time); //Llame para obtener la API de tiempo del sistema.

//GetLocalTime(); Esta función se utiliza para obtener la API de hora local.

char *t_y;

char *t_m;

char *t_h;

char *t_ Min

char * t _ s;

char * t _ Mi

char * t _ d

char * t _ w; p>SYSTEMTIME time; // Declaración de estructura de tiempo, esta estructura es el sistema,

getsystem time(& time); //Llame para obtener la API de hora del sistema.

sprintf(t_y, " %d ", time . wyear); // Genera el formato de año en la variable t_y.

sprintf(t_m, "%d", hora . wmes

sprintf(t_w, " %d ", hora . wdayofweek); (t_d, " %d ", hora . wday);

sprintf(t_h, " %d ", hora . whour);

sprintf(t_Min, " %d ", tiempo . wminuto);

sprintf(t_s, " %d ", tiempo . ws segundo

sprintf(t_Mi, " %d ", tiempo . wmillsegundos

p>

p>

printf("%s,%s,%s,%s,%s,%s,%s,%s,%s",

Hora. Año,

hora.wMes,

hora.wDíaDeLa Semana,

hora.wDía,

hora.wHora,

tiempo .wm minutos,

tiempo ws segundo,

tiempo wmillsegundos . *

Los miembros de la estructura del sistema son los siguientes:

Estructura horaria del sistema

{

WORD wAño año

WORD wMes luna

WORD wDayOfWeek, 0=Domingo, 1=Lunes. ...

WORD wDía sol

Palabra wHora hora

WORD wMinuto minuto

WORD wSegundo segundo

WORD wMilisegundos milisegundos

}El tiempo del sistema finaliza

//***/