Skip to content

Commit

Permalink
docs: fix instructions of lasagna master (#852)
Browse files Browse the repository at this point in the history
* Update instructions.md

The instructions of Task 3 have been clarified.

* Correcting after first revision

* Update exercises/concept/lasagna-master/.docs/instructions.md

Co-authored-by: Christian Willner <[email protected]>

* Adding the possibility of using a reference also for the second parameter

---------

Co-authored-by: Christian Willner <[email protected]>
  • Loading branch information
fabiodinatale and vaeng authored Jun 6, 2024
1 parent b23bddf commit d50951d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exercises/concept/lasagna-master/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ It was amazing and had something special to it.
The friend sent you the list of ingredients and told you the last item on the list is the "secret ingredient" that made the meal so special.
Now you want to add that secret ingredient to your recipe as well.

Write a function `addSecretIngredient` that accepts two `string` vectors of ingredients as parameters.
The first parameter is the list your friend sent you, the second is the ingredient list of your own recipe.
Write a function `addSecretIngredient` that accepts two `vector of strings` as parameters.
The first parameter is a _reference_ to the ingredients of your own recipe, and the second _vector_ of strings has the ingredients your friend sent you.
The last element in your ingredient list is always `"?"`.
The function should replace it with the last item from your friends list.
**Note:** `addSecretIngredient` does not return anything - you should modify the list of your ingredients directly.
The list with your friend's ingredients should **not** be modified.
The list with your friend's ingredients can also be a reference (for improving the performance), but it should **not** be modified.
Make sure the list will not be modified with a `const` reference.

```cpp
Expand Down

0 comments on commit d50951d

Please sign in to comment.