Analysis of typical problems (15)
After a period of writing, our data structure library has reached a certain scale. So the code we wrote before doesn't have a bit of bug? Every code has been tested before, so there is no bug, but let's analyze it to see if there is no bug at all.
Test 1: null pointer problem when creating an exception object, as follows
Main.cpp is as follows
# include # include "Exception.h" using namespace std;using namespace DTLib;int main () {try {NullPointerException npe; cout