Προς το περιεχόμενο

Synarthsh xronou sthn C


Godfath3r

Προτεινόμενες αναρτήσεις

Δημοσ.

Hmeromhnia/Wra ypo8etw pws ennoeis, an einai etsi tote paizoun oi ekshs synarthseis:

time_t time(time_t *tp), pou epistrefei thn hmerologiakh wra.

struct tm *gmtime(const time_t *tp), metatrepei apo time_t se wra Greenwich.

char *asctime(const struct tm *tp), gia na pareis thn wra se ektypwsimh morfh.

 

P.x. ena aplo programmataki gia na deis thn trexousa hmeromhnia/wra einai to ekshs:

>
#include <stdio.h>
#include <time.h>

int main()
{
  time_t currTime;
  struct tm *myTime;

  time(&currTime);
  myTime = gmtime(&currTime);

  printf("%s",asctime(myTime));

  return 0;
}

 

Pio analytika google it

h edw: http://www.acm.uiuc.edu/webmonkeys/book/c_guide/2.15.html

Δημοσ.

Mhpws ksereis ('h opoiosdhpote allos) kanena site pou na periexei headers arxeia kai epishs pws mporw na dw oles tis synarthseis pou yparxoun se ena header?An den ginetai mhpws yparxei kanena site???

Αρχειοθετημένο

Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.

  • Δημιουργία νέου...