Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions wiki/cpp-tutorial/debugging-gdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -108,7 +108,7 @@ Lets start with the obligatory hello world example:
```cpp:line-numbers
#include <iostream>
int main() {
std::cout << "Hello, GDB!";
std::cout << "Hello, GDB!" << std::endl;
return 0; /* break here */
}
```
Expand All @@ -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;
```

Expand Down
2 changes: 1 addition & 1 deletion wiki/cpp-tutorial/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions wiki/cpp-tutorial/language-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down
Loading