C - Error in Comparing Variable of Struct and String : <p>I am trying to implement a function that compares two strings. However, i am getting "expression must be a modifiable lvalue" in function strcmp even if i use char pointers instead of char array. My code is in following.</p>

<pre><code>typedef enum { false, true } boolean;

struct threeGram *threeGram_array;

struct threeGram
{
    const char *value;
    int occurence;
};

boolean containsValue(struct threeGram array[], const char *string){

    int i;
    for(i = 0; i &lt; sizeof (array) / sizeof (struct threeGram); i++){
        if(strcmp(array[i].value, string) = 0){
            return true;
        }
    }
    return false;
}
</code></pre>
