directory

  • A. Introduction of __TIME__
  • 2. __TIME__ of actual combat
  • Guess you like it

C/C++ learning Directory >> C language basics

one__TIMEIntroduction of __

ANSI C defines many macros. You can use these macros in programming, but you cannot directly modify the predefined macros.

__DATE__ The current date, a string constant in the format “MMM DD YYYY”.

__TIME__ The current time, a string constant in HH:MM:SS format.

__FILE__ This will contain the current file name, a string constant.

__LINE__ This will contain the current line number, a decimal constant.

__STDC__ is defined as 1 when the compiler compiles to ANSI standards; Determine if the file is standard C procedure.

2. __TIME__ of actual combat

TIME Indicates the date of the file being compiled in Windows. Note that the return value is a string;

char time[] = __TIME__; Printf (" compile date: %s\n", time); /* Compile time: 11:30:15 */Copy the code

Note:

  • __DATE__ The current date, a string constant in the format “MMM DD YYYY”.
  • __TIME__ The current time, a string constant in HH:MM:SS format.

Guess you like it

  1. C array subscript out of bounds and memory overflow difference
  2. C language pointer declaration and definition
  3. P ++ / p –
  4. The C languagep++/§ + + / _ (p++) / _p + +
  5. C language uses Pointers to iterate over groups of numbers
  6. C language pointer and array difference
  7. C language pointer array and array pointer difference
  8. C NULL pointer
  9. C void Pointers
  10. C language field pointer
  11. C function value passing and address passing
  12. Default parameter of C language function
  13. C language function variable parameter
  14. C function pointer
  15. C language pointer function
  16. C language callback function callback
  17. C typedef
  18. C defines constants
  19. C define prevents repeated inclusion of header files
  20. Pragma once
  21. C language #include <> is different from #include
  22. C const decorates a variable
  23. C const decorates Pointers
  24. C const modifier functions
  25. C const decorates function arguments
  26. C const is different from define
  27. C __TIME__

C language __TIME__

This article is published by the blog – Ape Say Programming Ape Say programming!