C

C/C++:0~9字元(char)轉成整 …

此內容由 Notion 編輯並經由 Notion API 自動轉成 Hugo 頁面 The content write by Notion, and use Notion API convert to Hugo page. char a = '4'; int ia = a - '0'; /* check here if ia is bounded by 0 and 9 */ Refer Convert char to int in C and C++ - Stack Overflow

C/C++:自訂 Debug 訊息

此內容由 Notion 編輯並經由 Notion API 自動轉成 Hugo 頁面 The content write by Notion, and use Notion API convert to Hugo page. #include <stdarg.h> #include <stdio.h> #define COLOR_X "\033[0m" #define COLOR_I "\033[92m" #define COLOR_D "\033[96m" #define COLOR_W …