Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 1005 Bytes

diagnostic-printed-by-the-assert-function.md

File metadata and controls

27 lines (23 loc) · 1005 Bytes
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic dev_langs ms.assetid caps.latest.revision author ms.author manager
Diagnostic Printed by the assert Function | Microsoft Docs
11/04/2016
cpp-language
article
C++
78b64200-520d-40da-9a61-71553f411d4f
6
mikeblome
mblome
ghogen

Diagnostic Printed by the assert Function

ANSI 4.2 The diagnostic printed by and the termination behavior of the assert function

The assert function prints a diagnostic message and calls the abort routine if the expression is false (0). The diagnostic message has the form

Assertion failed: expression**, file** filename**, line** linenumber

where filename is the name of the source file and linenumber is the line number of the assertion that failed in the source file. No action is taken if expression is true (nonzero).

See Also

Library Functions