Arrays are automatically passed by reference. If you want to pass a null-terminated character array, you can make the function parameter char* text or char text[] since the size is determined by the terminating null character. For other arrays, you have to pass the size as a separate parameter, or as part of the array parameter: int arr[5].

Of course, in C++ you should just use the C++ string class instead null-terminated character arrays, and vector (or some other container) instead of regular arrays.