Embed timestamp in object code at compile time with C++

后端 未结 7 843
梦谈多话
梦谈多话 2021-01-03 17:58

I want to perform a printf() to display when the currently executing code was last compiled. Does C/C++ provide a macro that gives you that resolves to a timest

7条回答
  •  一生所求
    2021-01-03 18:12

    It looks like compilers are expected to provide a __TIMESTAMP__ macro, which ought to work for your purposes.

提交回复
热议问题