From d50951d8979f7e0ad1c94a009b26cf3e17ed1e50 Mon Sep 17 00:00:00 2001 From: Fabio Di Natale Date: Thu, 6 Jun 2024 11:43:09 +0200 Subject: [PATCH] docs: fix instructions of lasagna master (#852) * 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 <34183939+vaeng@users.noreply.github.com> * Adding the possibility of using a reference also for the second parameter --------- Co-authored-by: Christian Willner <34183939+vaeng@users.noreply.github.com> --- exercises/concept/lasagna-master/.docs/instructions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/concept/lasagna-master/.docs/instructions.md b/exercises/concept/lasagna-master/.docs/instructions.md index 0d13bd22..9d2e08a2 100644 --- a/exercises/concept/lasagna-master/.docs/instructions.md +++ b/exercises/concept/lasagna-master/.docs/instructions.md @@ -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