Thread: Broken Ctiming?

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    25

    Broken Ctiming?

    Code:
        time_t feed;
        feed = time (NULL);
    this is the part of my code that hass the error. the compiler (dev bloodshed C++) gives this error message
    "31 no match for call to `(std::string) (NULL)' "
    i seem to be doing it right, so why the message?

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    Do you have a string variable called time somewhere in the code above or in the #include'd headers? What happens when you use <ctime> and std::time?

  3. #3
    Registered User SKeane's Avatar
    Join Date
    Sep 2006
    Location
    England
    Posts
    234
    You could also try

    Code:
    time_t feed;
    feed = time( (time_t) NULL );

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Your typecast would be incorrect, since the function expects a pointer, not a time_t instance.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. broken application
    By bejiz in forum Tech Board
    Replies: 1
    Last Post: 08-17-2007, 09:12 AM
  2. Broken Necklace
    By sybariticak47 in forum Windows Programming
    Replies: 6
    Last Post: 01-22-2006, 03:31 PM
  3. undeclared identifier problem
    By jjj93421 in forum C++ Programming
    Replies: 13
    Last Post: 04-24-2004, 09:22 AM
  4. Resume a broken download
    By Echidna in forum Windows Programming
    Replies: 2
    Last Post: 01-06-2003, 09:44 AM
  5. Broken Link
    By JoshG in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 05-13-2002, 03:43 PM