Skip to content

Commit 8e8e093

Browse files
committed
deploy: 986599c
1 parent 171aa8d commit 8e8e093

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

design_gamedev/index.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,12 @@ <h3 id="_3">封装在类内部</h3>
301301
Game() { ... }
302302

303303
public:
304-
inline static Game instance; // 如果定义在头文件中,需要 inline!
304+
// inline static Game instance; // 虽然很爽,但不能这样写,因为 Game 在他的 }; 结束前都是不完整类型
305+
static Game instance; // 非定义声明,就好比全局变量的 extern Game instance 一样,不需要是完整类型
305306
};
306307

308+
inline Game Game::instance; // 如果定义在头文件中,需要 inline!
309+
307310
Game::instance.updatePlayers();
308311
</code></pre>
309312
<ol start="2">

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ <h2 id="_1">前言</h2>
252252
<blockquote>
253253
<p><img src="./img/bulb.png" height="30px" width="auto" style="margin: 0; border: none"/> 本书还在持续更新中……要追番的话,可以在 <a href="https://github.com/parallel101/cppguidebook">GitHub</a> 点一下右上角的 “Watch” 按钮,每当小彭老师提交新 commit,GitHub 会向你发送一封电子邮件,提醒你小彭老师更新了。</p>
254254
</blockquote>
255-
<p>更新时间:2024年08月15日 08:13:31 (UTC+08:00)</p>
255+
<p>更新时间:2024年08月15日 08:14:01 (UTC+08:00)</p>
256256
<h2 id="_2">格式约定</h2>
257257
<blockquote>
258258
<p><img src="./img/bulb.png" height="30px" width="auto" style="margin: 0; border: none"/> 用这种颜色字体书写的内容是温馨提示</p>

print_page/index.html

+5-2
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ <h2 id="index-_1">前言</h2>
353353
<blockquote>
354354
<p><img src="../img/bulb.png" height="30px" width="auto" style="margin: 0; border: none"/> 本书还在持续更新中……要追番的话,可以在 <a href="https://github.com/parallel101/cppguidebook">GitHub</a> 点一下右上角的 “Watch” 按钮,每当小彭老师提交新 commit,GitHub 会向你发送一封电子邮件,提醒你小彭老师更新了。</p>
355355
</blockquote>
356-
<p>更新时间:2024年08月15日 08:13:31 (UTC+08:00)</p>
356+
<p>更新时间:2024年08月15日 08:14:01 (UTC+08:00)</p>
357357
<h2 id="index-_2">格式约定</h2>
358358
<blockquote>
359359
<p><img src="../img/bulb.png" height="30px" width="auto" style="margin: 0; border: none"/> 用这种颜色字体书写的内容是温馨提示</p>
@@ -10424,9 +10424,12 @@ <h3 id="design_gamedev-_3">封装在类内部</h3>
1042410424
Game() { ... }
1042510425

1042610426
public:
10427-
inline static Game instance; // 如果定义在头文件中,需要 inline!
10427+
// inline static Game instance; // 虽然很爽,但不能这样写,因为 Game 在他的 }; 结束前都是不完整类型
10428+
static Game instance; // 非定义声明,就好比全局变量的 extern Game instance 一样,不需要是完整类型
1042810429
};
1042910430

10431+
inline Game Game::instance; // 如果定义在头文件中,需要 inline!
10432+
1043010433
Game::instance.updatePlayers();
1043110434
</code></pre>
1043210435
<ol start="2">

search/search_index.json

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)