Answers for "how to pass std::array with unknown size to function C++"

C++
0

how to pass std::array with unknown size to function C++

template<std::size_t SIZE>
void mulArray(std::array<int, SIZE>& arr, const int multiplier) {
    for(auto& e : arr) {
        e *= multiplier;
    }
}
Posted by: Guest on June-10-2021

Code answers related to "how to pass std::array with unknown size to function C++"

Browse Popular Code Answers by Language