<p>By that I mean, what do I need to do to have useful assertions in my code?</p>

<p>MFC is quite easy, i just use ASSERT(something).</p>

<p>What's the non-MFC way?</p>

<p><strong>Edit:</strong> Is it possible to stop assert breaking in assert.c rather than than my file which called assert()?</p>

<p><strong>Edit:</strong> What's the difference between <code>&lt;assert.h&gt;</code> &amp; <code>&lt;cassert&gt;</code>?</p>

<p><strong>Accepted Answer:</strong> Loads of great answers in this post, I wish I could accept more than one answer (or someone would combine them all). So answer gets awarded to Ferruccio (for first answer).</p>

```
```
#include <cassert>

assert(something);
```
```
and for compile-time checking, Boost's static asserts are pretty useful:
```
```
#include <boost/static_assert.hpp>

BOOST_STATIC_ASSERT(sizeof(int) == 4);  // compile fails if ints aren't 32-bit
```
```