C and C++ love you to use pointers to memory and references because it is more direct and faster than the use of variables. So in this tutorial we see four different ways to write a function that can change two different types of arrays (int[] and char[]). In C++ and Java when you have enough similarity between data type functions as you can see here, you can set up templates, but that is for another tutorial.
Background reading for tutorial:
Here is a tutorial that introduces you to some C programming code for use of arrays, pointers, pointers to pointers, references and malloc …
Let’s see some C(++) via XCode for this …
Link to some downloadable programming code … rename to main.cpp (or main.c … see how XCode can do C as well!) for use.
If this was interesting you may be interested in this too.