diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 54c9d45..3480aff 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -57,17 +57,17 @@ "state": { "type": "markdown", "state": { - "file": "Diary/2026-1/2026-1-23 周五.md", + "file": "Collection/连~都忘记了的C语言小知识.md", "mode": "source", "source": false, "backlinks": false }, "icon": "lucide-file", - "title": "2026-1-23 周五" + "title": "连~都忘记了的C语言小知识" } } ], - "currentTab": 2 + "currentTab": 3 } ], "direction": "vertical" @@ -292,11 +292,11 @@ "remotely-save:Remotely Save": false } }, - "active": "fa1d4d0680240de1", + "active": "6bbdb6c9df9a2d8f", "lastOpenFiles": [ + "Diary/2026-1/2026-1-23 周五.md", "Collection/连~都忘记了的C语言小知识.md", "YueQian/相关网站.md", - "Diary/2026-1/2026-1-23 周五.md", "README.md", "Excalidraw/Drawing 20260122.md", "test.md", diff --git a/Collection/连~都忘记了的C语言小知识.md b/Collection/连~都忘记了的C语言小知识.md index ed24813..f884398 100644 --- a/Collection/连~都忘记了的C语言小知识.md +++ b/Collection/连~都忘记了的C语言小知识.md @@ -4,3 +4,10 @@ tags: aliases: empty 日期: 2026/1/23 --- +- 字符转数字要 `-'0'` +```c + char arr[10]; + for(int i = 0;i < strlen(arr);i++) + num = num * 10 + arr[i] - '0'; +``` +- \ No newline at end of file