C/assert: Różnice pomiędzy wersjami
Usunięta treść Dodana treść
→Przykład: poprawki |
|||
Linia 20:
===Przykład===
<source lang="c">
int err=1;
assert(err==0);
return 0;
</source>
Program wypisze komunikat podobny do:
Assertion failed: err==0, file test.c, line 6
Natomiast jeśli uruchomimy:
<source lang="c">
int err=1;
assert(err==0);
return 0;
</source>
nie pojawi się żaden komunikat o błędach.
|