5 ms·
The evilest way to write `nullptr`.
by hoseja 4y ago
The evilest way to write `nullptr`.
- shultays 4y agoit is not nullptr, it is address past \0 in "", which is an invalid address
- hoseja 4y agoHence, evilest. (It got me.)
- 3836293648 4y agoNo, the address itself is not invalid, you're just not allowed to dereference it. Pointers have to point at a valid object or, in the case of arrays, one past the end of the array. It's what `std::end` returns