Hi everyone I had a few more quick questions...I'm trying to right the function that puts the correct letters in the right positons being reported from my previous compareletter function for my game of hang man and its not updating the word in progress array.
Here's my function:
//updates the word in progress array with correct guesses
void updateWIP (char array[], char guess, int result)
{
if (result !=-1)
array[result] = guess;
}
Now in my c book , it speaks of a strncpy function but when I tried to use strncpy(array, guess, result); it reported argument type of char is incompatible with parameter type char const. The result is the number of the last correctly reported positon of the correct letter and guess is the current correct letter needing to be copied to the wip array to replace the asterick in that position with whatever guess is.