Thread: time_t doing not what i expect

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    91

    time_t doing not what i expect

    what im trying to do is store the time & date into a string..


    Code:
    string timeformat;
    time_t x;
    tm * time_;
    time(&x); // get current time_t value
    time_ = localtime(&x);
    cout << time_->tm_mday << endl;    //here it prints out the right thing..
    
    timeformat = time_->tm_mday;  
    // here it doesnt do what i want it to do. here timeformat = "";
    ??
    Last edited by paperbox005; 08-15-2004 at 12:55 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What to expect from pre-calc?
    By psychopath in forum A Brief History of Cprogramming.com
    Replies: 31
    Last Post: 06-26-2007, 05:34 PM
  2. using expect script in C program
    By nitinmhetre in forum Linux Programming
    Replies: 1
    Last Post: 12-21-2006, 08:25 AM
  3. if clause not working as I expect.
    By luise.valencia in forum C Programming
    Replies: 4
    Last Post: 04-16-2005, 08:35 PM
  4. C++ calling an expect module
    By 15332000 in forum C++ Programming
    Replies: 0
    Last Post: 09-03-2004, 01:00 PM
  5. What to expect for pay rate developing software
    By Shadow12345 in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 11-04-2002, 02:56 PM