What does msvc 6 throw when an integer divide by zero occurs?

前端 未结 4 790
陌清茗
陌清茗 2021-01-26 04:10

I have been doing a bit of experimenting, and have discovered that an exception is being thrown, when an integer divide by zero occurs.

#include 

        
4条回答
  •  余生分开走
    2021-01-26 04:52

    In msvc6 you can catch it with catch(...) and rethrow it with throw; however since you can't detect exception type that way you're better off doing something else.

提交回复
热议问题