C Tutorial/assert.h/assert — различия между версиями

Материал из C\C++ эксперт
Перейти к: навигация, поиск
м (1 версия: Импорт контента...)
 
(нет различий)

Текущая версия на 10:32, 25 мая 2010

assert

Item Value Header file assert.h Declaration void assert(int exp); Function writes error information to stderr and then aborts program execution if the expression exp evaluates to zero.

Define NDEBUG to ignore the assert() macros.


#include <assert.h>
 
  int main(void){
    assert(1==2);
  }