【发布时间】:2019-04-04 09:25:14
【问题描述】:
我想在连接到数据库时捕获异常,我正在使用 try catch,我使用指针,但无论如何它给了我这样的错误。
C3867 '_com_error::Description': non-standard syntax; use '&' to create a pointer to member。 e.Description 上也没有红线,它只是在错误列表中给了我这个按摩。
什么是解决方案?提前谢谢你。
try
{
}
catch (_com_error &e)
{
printf(e.Description);
}
【问题讨论】:
标签: c++ pointers exception com try-catch