Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

C++ Programming/Code/Standard C Library/Functions/assert

From Wikibooks, open books for an open world
<C++ Programming |Code/Standard C Library |Functions

assert

[edit |edit source]
Syntax
#include<cassert>assert(exp);

The assert() macro is used to test for errors. If exp evaluates to zero, assert() writes information to stderr and exits the program. If the macro NDEBUG is defined, the assert() macros will be ignored.

Related topics
abort
Retrieved from "https://en.wikibooks.org/w/index.php?title=C%2B%2B_Programming/Code/Standard_C_Library/Functions/assert&oldid=3676969"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp