1. 背景说明
静态单链表实现类似于单链表,只是指针域变成了数组下标。
- A = { c, b, e, g, f, d }
-
- B = { a, b, n, f }
-
- C = (A - B) U (B - A) = { c, e, g, d, n, a }
2. 示例代码
1) errorRecord.h
- // 记录错误宏定义头文件
-
- #ifndef ERROR_RECORD_H
- #define ERROR_RECORD_H
-
- #include
- #include
- #include
-
- // Extracts the file name from the file path
- #define FILE_NAME(X) strrchr(X, '\\') ? strrchr(X, '\\') + 1 : X
-
- // Define DEBUG macro for enabling debug mode
- #define DEBUG
-
- // Print error message
- #ifdef