Update README.md
This commit is contained in:
parent
175fcc7978
commit
9218a3fd4c
1 changed files with 3 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
|||
In this exercise we will look together at what happens when we change a reference
|
||||
parameter to a value or a const reference.
|
||||
|
||||
Let's look at this function
|
||||
Let's look at this function in [`Game.cpp`](../../../lib/Game.cpp)
|
||||
|
||||
```cpp
|
||||
void Game::processEvents(InputState & inputState) {
|
||||
|
@ -28,6 +28,8 @@ void Game::processEvents(InputState & inputState) {
|
|||
|
||||
## Exercise
|
||||
|
||||
You can follow along locally:
|
||||
|
||||
1. Make `inputState` a value. What happens when you compile the code? Can you explain why?
|
||||
|
||||
2. Now make it a `const` reference. What happens? Can you explain why?
|
||||
|
|
Loading…
Reference in a new issue