From 90ceb7bc5ed5684ab2dc32d9dafeaaa10baf9866 Mon Sep 17 00:00:00 2001 From: ngtv Date: Thu, 25 Jun 2026 06:35:40 +0700 Subject: [PATCH 1/6] Fix typo "1" -> "0" --- wiki/cpp-tutorial/language-basics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/cpp-tutorial/language-basics.md b/wiki/cpp-tutorial/language-basics.md index a4778ec..4703a5a 100644 --- a/wiki/cpp-tutorial/language-basics.md +++ b/wiki/cpp-tutorial/language-basics.md @@ -81,7 +81,7 @@ int foo = 0; // declaration statement foo = foo + 2; // expression statement ``` -The above snippet creates `foo` with an initial value of `1`, then evaluates `foo + 2` before assigning the value back +The above snippet creates `foo` with an initial value of `0`, then evaluates `foo + 2` before assigning the value back to the variable `foo`. ## Identifiers From 9c5272c1f28644d5c5c14561e7462b007f004c2b Mon Sep 17 00:00:00 2001 From: ngtv Date: Thu, 25 Jun 2026 06:36:36 +0700 Subject: [PATCH 2/6] Fix typo "a integer" -> "an integer" --- wiki/cpp-tutorial/language-basics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/cpp-tutorial/language-basics.md b/wiki/cpp-tutorial/language-basics.md index 4703a5a..c53530d 100644 --- a/wiki/cpp-tutorial/language-basics.md +++ b/wiki/cpp-tutorial/language-basics.md @@ -294,7 +294,7 @@ together and write a simple program that changes Fahrenheit to Celsius. The equation to convert the two is very simple: $C = (F - 32) / (9 / 5)$. -Because temperature is not a integer value, but a real number, we will use `double` to store our variables. +Because temperature is not an integer value, but a real number, we will use `double` to store our variables. ```cpp int main() { From 67b178d051365794adf5008aefc707719affce7c Mon Sep 17 00:00:00 2001 From: ngtv Date: Thu, 25 Jun 2026 06:38:07 +0700 Subject: [PATCH 3/6] Fix typo "stepping trough" -> "stepping through" --- wiki/cpp-tutorial/debugging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/cpp-tutorial/debugging.md b/wiki/cpp-tutorial/debugging.md index 7ac3b14..46f09fd 100644 --- a/wiki/cpp-tutorial/debugging.md +++ b/wiki/cpp-tutorial/debugging.md @@ -45,7 +45,7 @@ test for different scenarios. Main features of a debugger are: - Examining the suspended program - Examining the call stack - Inspecting memory -- Stepping trough the program +- Stepping through the program - Examine core dump files - Modifying the state of the program From b588ce4d2922b69d61675056ba1b0ac17794e799 Mon Sep 17 00:00:00 2001 From: ngtv Date: Thu, 25 Jun 2026 06:39:56 +0700 Subject: [PATCH 4/6] Fix typo "main1.cpp" -> "main.cpp" --- wiki/cpp-tutorial/debugging-gdb.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/cpp-tutorial/debugging-gdb.md b/wiki/cpp-tutorial/debugging-gdb.md index 6b28ad3..f73f32a 100644 --- a/wiki/cpp-tutorial/debugging-gdb.md +++ b/wiki/cpp-tutorial/debugging-gdb.md @@ -130,7 +130,7 @@ program `start`: Temporary breakpoint 1 at 0x123456: file main.cpp, line 3. Starting program: /file/path/to/main.out -Temporary breakpoint 1, main () at main1.cpp:3 +Temporary breakpoint 1, main () at main.cpp:3 3 std::cout << "Hello, GDB!" << std::endl; ``` From 2d63e3f4490083ccf4422c1eaa42dbc8b2b72cb4 Mon Sep 17 00:00:00 2001 From: ngtv Date: Thu, 25 Jun 2026 06:44:42 +0700 Subject: [PATCH 5/6] fix missing `std::endl` in code --- wiki/cpp-tutorial/debugging-gdb.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/cpp-tutorial/debugging-gdb.md b/wiki/cpp-tutorial/debugging-gdb.md index f73f32a..e459027 100644 --- a/wiki/cpp-tutorial/debugging-gdb.md +++ b/wiki/cpp-tutorial/debugging-gdb.md @@ -108,7 +108,7 @@ Lets start with the obligatory hello world example: ```cpp:line-numbers #include int main() { - std::cout << "Hello, GDB!"; + std::cout << "Hello, GDB!" << std::endl; return 0; /* break here */ } ``` From 178c695b4468488849a4d2adecac82b23985af7a Mon Sep 17 00:00:00 2001 From: ngtv Date: Thu, 25 Jun 2026 13:42:11 +0700 Subject: [PATCH 6/6] fix typo: thru -> through --- wiki/cpp-tutorial/debugging-gdb.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/cpp-tutorial/debugging-gdb.md b/wiki/cpp-tutorial/debugging-gdb.md index e459027..e317c2d 100644 --- a/wiki/cpp-tutorial/debugging-gdb.md +++ b/wiki/cpp-tutorial/debugging-gdb.md @@ -80,7 +80,7 @@ gdb program - `run, r` - start the program execution inside of gdb - `start` - creates a temporary breakpoint at `main()` and start execution -### Launch the executable and step thru the program +### Launch the executable and step through the program - `next, n` - executes the next line of code - `nexti, ni` - executes the next instruction