Get Unix timestamp with C++

后端 未结 7 607
南旧
南旧 2020-12-02 20:00

How do I get a uint unix timestamp in C++? I\'ve googled a bit and it seems that most methods are looking for more convoluted ways to represent time. Can\'t I j

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 20:12

    #include 
    #include 
    
    using namespace std;
    
    int main ()
    {
      unsigned long int sec= time(NULL);
      cout<

提交回复
热议问题