The assert macro is used to add diagnostics to programs:
void assert(int expression)
If expression is zero when
assert(expression)
is executed, the assert macro will print on stderr a message, such as
Assertion failed: expression, file filename, line nnn
It then calls abort to terminate execution. The source filename and line number come from the
preprocessor macros __FILE__ and __LINE__.
If NDEBUG is defined at the time <assert.h> is included, the assert macro is ignored.

相关文章:

  • 2022-01-22
  • 2021-10-08
  • 2022-12-23
  • 2022-01-14
  • 2022-01-12
  • 2021-08-18
  • 2021-08-13
  • 2021-09-07
猜你喜欢
  • 2022-12-23
  • 2021-10-14
  • 2022-01-22
  • 2021-06-05
  • 2021-08-11
  • 2021-08-22
  • 2021-06-12
相关资源
相似解决方案