开发者

time.h library default functions C++

开发者 https://www.devze.com 2023-03-12 12:28 出处:网络
i was wonder if the localtime() function work on Linux? i though there is 开发者_如何学编程another command for that but i cant remember it now

i was wonder if the localtime() function work on Linux? i though there is 开发者_如何学编程another command for that but i cant remember it now

apparently my assignment have to work on linux or it doesn't count for marks and my parents does not know how to use it


According to this localtime() should work perfectly fine with Linux.

From the linked:

    #include <time.h>
    //...
    struct tm *localtime(const time_t *timep);
    struct tm *localtime_r(const time_t *timep, struct tm *result);

If that declaration is the same localtime() that you're asking about (and I assume it is) then you should be just fine using it on Linux based machines.


Yes localtime() function works on Linux. Check the reference here.

0

精彩评论

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