gpt4 book ai didi

c++ - 在 VC++ 中使用 try/catch 了解异常类型

转载 作者:行者123 更新时间:2023-11-28 07:51:30 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Determining exception type after the exception is caught?

我知道 C# 中的异常处理:

try{
// code causing exception
}
catch(System.Exception e){
// Here e variable holds the information about the actual exception that has occured in try block.
}

但是,我想在 VC++(在 VS 2008 上)中实现相同的目的。VC++中没有包的概念,如何捕获在VC++的try block 中发生的异常类型

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com