开发者

How is time_t defined? [duplicate]

开发者 https://www.devze.com 2023-03-18 09:53 出处:网络
This question already has answers here: 开发者_如何转开发Closed 11 years ago. Possible Duplicate:
This question already has answers here: 开发者_如何转开发 Closed 11 years ago.

Possible Duplicate:

What is ultimately a time_t typedef to?

In /usr/include/time.h time_t is defined as typedef __time_t time_t. What does this mean exactly? Is the type of time_t compiler specific? I have heard it is by default a long value.


The Standard says:

7.23.1

The types declared are [...] time_t [...] which are arithmetic types capable of representing times

You just need to retain that it is an arithmetic type: you can perform arithmetic with values of time_t type.

0

精彩评论

暂无评论...
验证码 换一张
取 消