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

后端 未结 4 2340
猫巷女王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:05

    Personally, I would go for the third option:

    catch (const _com_error& e)
    

提交回复
热议问题