Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. Data::Data(){
  2. //CAPTURAR DATA ATUAL DO SISTEMA E INICIALIZAR
  3. time_t theTime = time(NULL);
  4. struct tm *aTime = localtime(&theTime);
  5.  
  6. dia = aTime->tm_mday;
  7. mes = aTime->tm_mon + 1; // Month is 0 - 11, add 1 to get a jan-dec 1-12 concept
  8. ano = aTime->tm_year + 1900; // Year is # years since 1900
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement