You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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]>
Copy file name to clipboardExpand all lines: exercises/concept/lasagna-master/.docs/instructions.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,12 +49,12 @@ It was amazing and had something special to it.
49
49
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.
50
50
Now you want to add that secret ingredient to your recipe as well.
51
51
52
-
Write a function `addSecretIngredient` that accepts two `string` vectors of ingredients as parameters.
53
-
The first parameter is the list your friend sent you, the second is the ingredient list of your own recipe.
52
+
Write a function `addSecretIngredient` that accepts two `vector of strings` as parameters.
53
+
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.
54
54
The last element in your ingredient list is always `"?"`.
55
55
The function should replace it with the last item from your friends list.
56
56
**Note:**`addSecretIngredient` does not return anything - you should modify the list of your ingredients directly.
57
-
The list with your friend's ingredients should **not** be modified.
57
+
The list with your friend's ingredients can also be a reference (for improving the performance), but it should **not** be modified.
58
58
Make sure the list will not be modified with a `const` reference.
0 commit comments