I'm reading this book on C++ and there's a code example that should behave differently: it should throw an exception or error (sorry for the poor terminology here) anyway it just shouldn't work or so the book says. (the book is rather new so I think its up to date). But in my case the code executes itself and I get the "Exception caught" message.
The author uses a different compiler (WxDev). (I'm using Visual Studio 2019)
#include<exception>
void generate_char_exception() …Run Code Online (Sandbox Code Playgroud)