I am making a program for fun to test out my knowledge of different types of C++ techniques. This program takes different information about airplane tickets someone bought. What i want to try to do, is make my cArray() function return the contents of the array back into main. After the first call to cArray() is returned, i make a call to displayArray from main() which fails to display the contents of ticketArray[].
Because all of your variables are global, main already has access to everything that cArray modifies. The return for cArray can be void, especially because on line 82 you do not use the return value when you call the function.
The reason displayArray does not work the second time is because of the value of i. When the function is called on line 41, i = numberOfTickets+1. When the function is called on line 86, i = 0. You pass 0 as the size of the array, so the display does not work as expected.