I’m looking how to pass a string/array to a function, I have tried to pass by value, but it doesn’t seem to work, I have looked online and seen by reference but that doesn’t seem to be working either.
Can anyone help?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You declare a function that takes an array of 10 ints by reference like this:
You call it like this
You can templatize your function