Broken Ctiming?

This is a discussion on Broken Ctiming? within the C++ Programming forums, part of the General Programming Boards category; Code: time_t feed; feed = time (NULL); this is the part of my code that hass the error. the compiler ...

  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,328
    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, 02: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, 08: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21