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
- C array subscript out of bounds and memory overflow difference
- C language pointer declaration and definition
- P ++ / p –
- The C languagep++/§ + + / _ (p++) / _p + +
- C language uses Pointers to iterate over groups of numbers
- C language pointer and array difference
- C language pointer array and array pointer difference
- C NULL pointer
- C void Pointers
- C language field pointer
- C function value passing and address passing
- Default parameter of C language function
- C language function variable parameter
- C function pointer
- C language pointer function
- C language callback function callback
- C typedef
- C defines constants
- C define prevents repeated inclusion of header files
- Pragma once
- C language #include <> is different from #include
- C const decorates a variable
- C const decorates Pointers
- C const modifier functions
- C const decorates function arguments
- C const is different from define
- C __TIME__
C language __TIME__
This article is published by the blog – Ape Say Programming Ape Say programming!