Hangman - trouble with strings

I have just begun programming, and I thought I would try my hand at making a very basic game of Hangman. The particular sequence I'm having trouble with is:

1
2
3
4
5
for(i=0; i<n-1; i++)
        {
            if(strcmp(word[i],letter[0])==0)strcpy(cop[i],letter[0]);
            else ok=0;
        }


It's supposed to check if the letter you have guessed can be found in the word (where "cop" is short for "copy", a copy of the word, but since that's a function I had to settle with this). The error I'm getting is:
"initializing argument 1 of 'int strcmp(const char*, const char*)' [-fpermissive]", as well as "error: invalid conversion from 'char' to 'const char*' [-fpermissive]".

Thanks in advance! :D
strcmp compares strings (char*). And it looks like you are trying to pass char to it.
Topic archived. No new replies allowed.