int_64 與 字符串相互轉化

int main()

{

       time_t cur_time = time(0);
       cout << "cur_time is:" << cur_time << endl;
       char ct[32];
       memset(ct,0,sizeof(ct));
       sprintf(ct,"%lu",cur_time);
       cout << "ct string is:" << ct << endl;
       time_t tt = atoll(ct);
      cout << "the end time is:" << tt << endl;

}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章