Getting compile time.

This is a discussion on Getting compile time. within the C Programming forums, part of the General Programming Boards category; Hello, I want to show the date when my program was compiled on my local machine. For example it shows ...

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    23

    Getting compile time.

    Hello,

    I want to show the date when my program was compiled on my local machine.
    For example it shows "Version 1.01, compiled at 'date'". Is there some way to get the date when my program is being compiled and store it in a variable?
    Or how could I do this?

    I am on Linux, if that matters.

  2. #2
    Registered User
    Join Date
    May 2010
    Location
    Naypyidaw
    Posts
    1,314

  3. #3
    cas
    cas is offline
    Registered User
    Join Date
    Sep 2007
    Posts
    993
    Note that Microsoft is wrong about __TIMESTAMP__: this is not a standard macro.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. compile time error
    By kapil1089thekin in forum C++ Programming
    Replies: 4
    Last Post: 09-01-2010, 12:29 PM
  2. Length of string at compile time?
    By TriKri in forum C Programming
    Replies: 14
    Last Post: 05-23-2010, 11:16 AM
  3. NtSetSystemTime() failed
    By medp7060 in forum C++ Programming
    Replies: 11
    Last Post: 04-02-2010, 02:58 AM
  4. compile time error...
    By Ruchikar in forum C++ Programming
    Replies: 7
    Last Post: 07-09-2002, 02:51 AM
  5. time class
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2001, 09:12 PM

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