Update README.md

This commit is contained in:
Patricia Aas 2021-10-17 19:24:42 +02:00 committed by GitHub
parent 175fcc7978
commit 9218a3fd4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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?