Code:
void input(char * first, char * last, double & winningNumber);
int main()
{
char first[80];
char last[80];
double winningNumber;
input(first, second, winningNumber);
//etc.
This should work just fine. Passing by reference can be done either by using a reference as a paramenter or by using a pointer as a parameter. An arrays name is (for intents and purposes) a pointer, so it works just fine in the above. You could also do this:
Code:
void input(char * first, char * last, double & winningNumber);
int main()
{
char * first = new char[80];
char * last = new char[80];
double winningNumber;
input(first, second, winningNumber);
//etc.
//not a bad idea to use the delete [] operator here but
//not absolutely necessary if the program ends here.
as ClownPrince indicated.