Sending array's to functions by reference or pointers
Is it not possible to send the adress of the first element of an array to a function? I tried every possible combination, including:
Code:
char myArray[50];
cout<<"Please enter a string: ";
cin.get(myArray,49);
myFunction(myArray)
//function header
void myFunction(char* array)
That didn't seem to do the trick. I would think that doing that would send the address of the first element in the array. Am I wrong?
How is it done? Using arrays of pointers??