Thread: Problem with ctime

  1. #16
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    Quote Originally Posted by Elysia View Post
    Right. So why bother with C functions where there is a better C++ alternative available?
    But there isn't a C++ language alternative: there is a Boost alternative written in C++. There is a difference. C++'s solution for time is C's solution for time.

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    That's really a semantics argument. That was not my point.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #18
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    Facts are not arguments.

  4. #19
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Whatever. Still not my point.
    Do I have to reword my reply?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #20
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    Don't even ask. You do this every time someone has anything to say about random things you recommend, no matter how well intentioned you are or they are.

  6. #21
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Your vagueness confounds me. Sorry, I have no idea what you are trying to say.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #22
    Registered User
    Join Date
    Jan 2011
    Posts
    87
    if you run a program once and it works in every path. it will always work until you change it.
    therefore, behavior is only undefined until you test it. once you test it and it works it will do the same thing every time, until you change it.
    however, if there is an external variable behavior can be undefined because the variable will affect the program, BUT then the behavior for the program is defined, but it relies on the variable.

    plz argue this. i want to see what points you will use
    Last edited by bobknows; 03-03-2011 at 07:28 PM.

  8. #23
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    AWESOME!

    I am so freaking glad that you've told me.

    I'm serious; I will never have to track down undefined behavior ever again. I'm so happy!

    Soma ^_^

  9. #24
    Registered User
    Join Date
    Jan 2011
    Posts
    87
    well, you still have to debug.

    when you get "undefined behavior" you have something that looks like it would work but varies from system to system. this can still can cause problems. most of the point of my argument was that "undefined behavior" is a misnomer. if it does it correctly once it will work correctly until a variable is changed

  10. #25
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    You have no idea what you are talking about. I know from your posts that you are a newbie. There is nothing wrong with that, but please stop offering such statements as if you know something. It might be the case that another newbie comes along and believes you.

    The phrases "undefined behavior" and "the behavior is undefined" appear in the C++ standard document to describe situations where the standard committee chose not to require a particular behavior. In practice, this means that a platform is allowed to do virtually anything in those situations. It may be that, for any given case of undefined behavior, the platform does define the behavior as an extension to the standard, but that need not be the case.

    In the real world employing undefined behavior may result in seemingly random crashes. This is simply the nature of the beast.

    Feeding invalid values, outside the range or domain, to the standard library functions is undefined behavior, and depending on the state of the system, outside the program environment, your program may or may not crash even if the program environment is exactly the same.

    Soma
    Last edited by phantomotap; 03-03-2011 at 08:00 PM. Reason: none of your business

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM