首页 新闻 会员 周边
1
回答数

回答被采纳 函数返回值处理策略

在使用C编程的时候,为了保证程序的稳壮性,通常需要对函数调用的返回值做充分的处理。但是这样会带来一些别的副作用,例如代码的可阅读性很差,很大一部分代码用来处理错误。参考驱动代码里面,采用了较多了got
1
回答数

回答被采纳 C++写的一段代码,不知道什么原因就报错了

1 #include "stdafx.h" 2 #include <stdio.h> 3 #include <string> 4 5 template<typename T> class ICompa
3
回答数

回答被采纳 20 求大神解释一下以下代码为何在正确捕获异常后会又得到一个异常?update

struct test { test() { if (!id) throw this; } int *id = nullptr; }; struct testex : public test { te