time.h library default functions C++
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.
精彩评论