Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¹ØÓÚC/C++ʱ¼äº¯Êý - C/C++ / C++ ÓïÑÔ

ÔÚÍøÉÏ¿´ÁËЩÏà¹Ø½éÉÜ£¬¿É»¹ÊDz»Ã»ÓÐÍêÈ«Ã÷°×¡£

[code=C/C++]
time_t time( time_t *timer )º¯Êý»ñÈ¡´Ó1970Äê1ÔÂ1ÈÕÒÔÀ´µÄÃëÊý.
struct tm 

int tm_sec; 
int tm_min; 
int tm_hour; 
int tm_mday; 
int tm_mon; 
int tm_year; //´Ó1900 ÄêËãÆðÖÁ½ñµÄÄêÊýint tm_wday; 
int tm_yday; 
int tm_isdst; 
}; 

Ϊʲô»¹»áÓе±Ç°Ê±¼ä¾àÀë1960Äê1ÔÂ1ÈÕµÄÃëÊý

Âé·³ÀÏÄñÃǸøÎÒ½â»ó£¬ÏÈл¹ýÁË
Ϊʲô»¹»áÓе±Ç°Ê±¼ä¾àÀë1960Äê1ÔÂ1ÈÕµÄÃëÊý
ÄÄÓУ¿

ÄѵÀûÓÐÂð,ÎÒÒ²²»È·¶¨,ºÃÏñÄÄÀï¼û¹ýµÄ!
ÒýÓÃ
Ϊʲô»¹»áÓе±Ç°Ê±¼ä¾àÀë1960Äê1ÔÂ1ÈÕµÄÃëÊý
ÄÄÓУ¿


»¹ÓÐΪʲôת»»ºóµÄʱ¼äºÍÕæʵʱ¼ä»áÏà²î8¸öСʱ£¬ÄÜ·ñ¾Ù¸öÀý¿´¿´

ÒýÓÃ
»¹ÓÐΪʲôת»»ºóµÄʱ¼äºÍÕæʵʱ¼ä»áÏà²î8¸öСʱ£¬ÄÜ·ñ¾Ù¸öÀý¿´¿´

ÓÃlocaltime()ת¡£

ßÀ¡£¡£ÔÚ¿ªÔ´ÁìÓò£¬ºÜ¶àʱ¼ä´Á¶¼ÊÇ´Ó1970¿ªÊ¼£¬Ïñ mysqlÕâÑùµÄÊý¾Ý¿âºÍphpµÈ£¨°üÀ¨c£©£¬ÕâÓÖ³Æ×÷Unixʱ¼ä´Á£¬ÒòΪÔÚ1970Ä꣬Unix²Ù×÷ϵͳÕýʽͶÈëʹÓá£ËùÒÔ ¶¼ÊǼÆËãµÄ´Ó1970Äê1ÔÂ1ÈÕ0ʱ0·Ö0Ãëµ½¸Ãʱ¼äµãËù¾­¹ýµÄÃëÊý¡£

ÒýÓÃ
»¹ÓÐΪʲôת»»ºóµÄʱ¼äºÍÕæʵʱ¼ä»áÏà²î8¸öСʱ£¬ÄÜ·ñ¾Ù¸öÀý¿´¿´

±±¾©Ê±ÇøºÍÊÀ½ç±ê׼ʱ¼ä(Ëƺõ½Ð¸ñÁÖÍþÖÎʱ¼ä),²î8Сʱ(-8)

C/C++ code:

g


Ïà¹ØÎÊ´ð£º

C/C++ÖÐÓÐûÓиñʽ»¯UÅ̵ĺ¯Êý - C/C++ / C++ ÓïÑÔ

´ó¼ÒºÃ£º
ÎÒÏëʵÏÖ¼ì²âµ½²åÈëSD¿¨ºó×Ô¶¯½«SD¿¨¸ñʽ»¯µÄ¹¦ÄÜ£¬²»ÖªC/C++ÖÐÓÐûÓиñʽ»¯UÅ̵ĺ¯Êý£¿
ÁíÍ⣬ÎÒ²»ÏëʹÓÃSHFormatDrive£¬ÒòΪÕâ¸öº¯Êý»áµ¯³öÊÇ·ñÒª¸ñʽ»¯µÄÌáʾ¿ò£¬ÎÒÐèÒªµÄÊÇϵͳ×Ô¶¯¸ñʽ»¯£¬¶ø²Ù×÷Õß² ......

c¾²Ì¬±àÒëÁíÒ»¸öÎļþ¼ÐµÄ¿âº¯Êý - C/C++ / CÓïÑÔ

ÔÚ¸ùĿ¼/libÖдæ·ÅÒ»¸ölog.c£¬log.h£¬²¢ÓÃÏÂÃæµÄÓï¾ä£º
gcc -c log.c
ar crv liblog.a log.o
±àÒë³öÒ»¸öliblog.a¾²Ì¬¿â£¬È»ºóÔÚÎļþ¼Ð£º/testfileÖд´½¨Ò»¸ötest.cºÍtestc.c£¬test.cÖÐÒýÓÃÁËtestc.cÖж¨ÒåµÄ·½·¨ ......

visual c++2008²»ÄܱàÒëC³ÌÐòÂð - C/C++ / CÓïÑÔ

visual c++2008Ëٳɰ棬²»ÄܱàÒëC³ÌÐòÂð£¿Èç¹ûÄÜÊÇÔõô¿ªÊ¼µÄ°¡£¿ÓÃËü´øµÄÃüÁîÌáʾµ¥Ôª³ýÍâ ¡£
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆ̨£©

¾ø¶Ô¿ÉÒÔ¡£½¨Á¢win32¿ØÖÆ̨³ÌÐò¾Í¿ÉÒÔ

ÒýÓÃ
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆ̨£ ......

¸ÕѧÍêCµÄ»ù´¡£¬ÇóÏÂÒ»²½ - C/C++ / CÓïÑÔ

ÎÒ¸Õ°ÑÌ·ºÆÇ¿µÄµÚÈý°æµÄÊéѧÍ꣬ÎÒÖªµÀµÄÓÐC++£¬CºÍÖ¸Õë CȱÏݺÍÏÝÚå Cר¼Ò±ä³É£¬»¹ÓÐÊý¾Ý½á¹¹£¬ÎÒÏëÎÊÎÊÎÒÓ¦¸ÃÒÔʲô˳ÐòÀ´Ñ§ÄØ
CȱÏݺÍÏÝÚå Cר¼Ò±à³Ì
Êǽø½×µÄ£¬²»Óü±×Å¿´
ÖÁÓÚ
CºÍÖ¸Õë 
Äã²»Àí½âÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ