1. 程式人生 > >int_64 與 字串相互轉化

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;

}