From 2e79413d10099c335efa95b9ff7106b6eb9f5a00 Mon Sep 17 00:00:00 2001 From: lewislu77 <44755521+lewislu77@users.noreply.github.com> Date: Fri, 12 Apr 2024 23:21:48 +0200 Subject: [PATCH] Update 02-modifyString.cpp --- 02-types/tasks/02-modifyString.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/02-types/tasks/02-modifyString.cpp b/02-types/tasks/02-modifyString.cpp index d6bce962..e9148f6d 100644 --- a/02-types/tasks/02-modifyString.cpp +++ b/02-types/tasks/02-modifyString.cpp @@ -1,9 +1,9 @@ #include #include -// TODO: Implement modifyString() -// It should modify passed string to text "Other string" - +void modifyString(std::string& str){ + str = "Other string" +} int main() { std::string str{"Some string"}; modifyString(str);