Warning while passing array by reference to function
I'm a novice to C programming and I am working on a program that keeps giving me a warning that I can't seem to get rid of. But rather than posting the chunks of code from the original program, I managed to create a simplified example of what I was doing that still causes the same Warning. First, here's my code:
When attempting to compile this in Visual Studio (it is saved as a .c file) I get the following two warnings:
int myFunc (char* inputArray);
int myFunc (char *inputArray)
inputArray = 'A';
1>.\Code.c(9) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'char (*)'
1>.\Code.c(9) : warning C4024: 'myFunc' : different types for formal and actual parameter 1
I know the issue has something to do with passing the array by reference to the function but I'm not sure how to fix the issue. Any help would be greatly appreciated.