Which is correct? catch (_com_error e) or catch (_com_error& e)?

后端 未结 4 2331
猫巷女王i
猫巷女王i 2021-02-19 11:36

Which one should I use?

catch (_com_error e)  

or

catch (_com_error& e)
4条回答
  •  灰色年华
    2021-02-19 12:04

    Also, note that, when using MFC, you may have to catch by pointer. Otherwise, @JaredPar's answer is the way you should normally go (and hopefully never have to deal with things that throw a pointer).

提交回复
热议问题