Skip to content

Commit da77eda

Browse files
committed
Fix spelling of 'Wizard'
1 parent 9ca0c11 commit da77eda

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

concepts/classes/about.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The definition of a new `class` can be seen in the following example.
2626
Notice the `;` after the definition.
2727

2828
```cpp
29-
class Wizzard {
29+
class Wizard {
3030
public: // from here on all members are accessible publicly
3131
int cast_spell() { // defines the public member function cast_spell
3232
return damage;
@@ -43,7 +43,7 @@ Take a look at `damage` inside the `cast_spell` function.
4343
You cannot read or change `private` members outside of the class:
4444
4545
```cpp
46-
Wizzard silverhand{};
46+
Wizard silverhand{};
4747
// calling the `cast_spell` function is okay, it is public:
4848
silverhand.cast_spell();
4949
// => 5
@@ -64,12 +64,12 @@ A class can have several constructors.
6464
This is useful if you do not always have a need to set all variables.
6565

6666
```cpp
67-
class Wizzard {
67+
class Wizard {
6868
public:
69-
Wizzard(std::string new_name) {
69+
Wizard(std::string new_name) {
7070
name = new_name;
7171
}
72-
Wizzard(std::string new_name, int new_damage) {
72+
Wizard(std::string new_name, int new_damage) {
7373
name = new_name;
7474
damage = new_damage;
7575
}
@@ -81,8 +81,8 @@ class Wizzard {
8181
int damage{5};
8282
};
8383

84-
Wizzard el{"Eleven"}; // deals 5 damage
85-
Wizzard vecna{"Vecna", 50}; // deals 50 damage
84+
Wizard el{"Eleven"}; // deals 5 damage
85+
Wizard vecna{"Vecna", 50}; // deals 50 damage
8686
```
8787
8888
Constructors are a big topic and have many nuances.
@@ -101,6 +101,6 @@ By default, everything in a `class` is `private`.
101101
Structs, on the other hand, are `public` until defined otherwise.
102102
Conventionally, the `struct` keyword is often used for **data-only structures**.
103103
The `class` keyword is preferred for objects that need to ensure certain properties.
104-
Such an invariant could be that the `damage` of your `Wizzard` `class` cannot turn negative.
104+
Such an invariant could be that the `damage` of your `Wizard` `class` cannot turn negative.
105105
The `damage` variable is private and any function that changes the damage would ensure the invariant is preserved.
106106
~~~~

concepts/classes/introduction.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The definition of a new `class` can be seen in the following example.
2525
Notice the `;` after the definition.
2626

2727
```cpp
28-
class Wizzard {
28+
class Wizard {
2929
public: // from here on all members are accessible publicly
3030
int cast_spell() { // defines the public member function cast_spell
3131
return damage;
@@ -42,7 +42,7 @@ Take a look at `damage` inside the `cast_spell` function.
4242
You cannot read or change `private` members outside of the class:
4343
4444
```cpp
45-
Wizzard silverhand{};
45+
Wizard silverhand{};
4646
// calling the `cast_spell` function is okay, it is public:
4747
silverhand.cast_spell();
4848
// => 5
@@ -63,12 +63,12 @@ A class can have several constructors.
6363
This is useful if you do not always have a need to set all variables.
6464

6565
```cpp
66-
class Wizzard {
66+
class Wizard {
6767
public:
68-
Wizzard(std::string new_name) {
68+
Wizard(std::string new_name) {
6969
name = new_name;
7070
}
71-
Wizzard(std::string new_name, int new_damage) {
71+
Wizard(std::string new_name, int new_damage) {
7272
name = new_name;
7373
damage = new_damage;
7474
}
@@ -80,8 +80,8 @@ class Wizzard {
8080
int damage{5};
8181
};
8282

83-
Wizzard el{"Eleven"}; // deals 5 damage
84-
Wizzard vecna{"Vecna", 50}; // deals 50 damage
83+
Wizard el{"Eleven"}; // deals 5 damage
84+
Wizard vecna{"Vecna", 50}; // deals 50 damage
8585
```
8686
8787
Constructors are a big topic and have many nuances.
@@ -100,6 +100,6 @@ By default, everything in a `class` is `private`.
100100
Structs, on the other hand, are `public` until defined otherwise.
101101
Conventionally, the `struct` keyword is often used for **data-only structures**.
102102
The `class` keyword is preferred for objects that need to ensure certain properties.
103-
Such an invariant could be that the `damage` of your `Wizzard` `class` cannot turn negative.
103+
Such an invariant could be that the `damage` of your `Wizard` `class` cannot turn negative.
104104
The `damage` variable is private and any function that changes the damage would ensure the invariant is preserved.
105105
~~~~

0 commit comments

Comments
 (0)