Title: Passing Strings To Functions C++ | hacking C++
Open Graph Title: Passing Strings To Functions C++
X Title: Passing Strings To Functions C++
Description: Which function parameter types should be used for taking strings? Four different scenarios are shwon: 1) read-only access in C++17, 2) read-only access in C++98 to C++14, 3) when a copy of the input string is always needed inside the function, 4) in-place modification of the input string.
Open Graph Description: Which function parameter types should be used for taking strings? Four different scenarios are shwon: 1) read-only access in C++17, 2) read-only access in C++98 to C++14, 3) when a copy of the input string is always needed inside the function, 4) in-place modification of the input string.
X Description: Which function parameter types should be used for taking strings? Four different scenarios are shwon: 1) read-only access in C++17, 2) read-only access in C++98 to C++14, 3) when a copy of the input string is always needed inside the function, 4) in-place modification of the input string.
Opengraph URL: https://hackingcpp.com/cpp/recipe/string_parameters.html
X: @hackingcpp
Domain: hackingcpp.com
| None | 86400 |
| author | André Müller |
| date | 2023-03-22 |
| copyright | 2019-2023 André Müller |
| theme-color | #0070C0 |
| og:image | https://hackingcpp.com/cpp/recipe/string_parameters_card.png |
| og:site_name | hacking C++ |
| og:locale | en_US |
| og:type | article |
| twitter:card | summary_large_image |
| twitter:image | https://hackingcpp.com/cpp/recipe/string_parameters_card.png |
| twitter:creator | @hackingcpp |
| hcpp-page-category | cat-recipe |
| hcpp-tags | C++ C++11 C++14 C++17 C++98 STL beginner-level modern-C++ recipe std-library |
Links:
Viewport: width=device-width, initial-scale=1.0