I never got the idea of asserts -- why should you ever use them?
I mean, let\'s say I were a formula driver and all the asserts were things like security belt, helm
For other answers to this question
assert()macro is used to test the conditions or assumptions that should not occur in a program. For example, the array index should always be > 0. Another assumption can be 2+2 == 3+1.So using assert () we can test such assumptions and as long as they evaluate to true, our program runs normally. When they are false, the program is terminated.
more here https://www.softwaretestinghelp.com/assert-in-cpp/