Ack. That should be:

if( s[x] == c )

Not:

if( s[x] = c )

(didn't feel like loggin in)

Quzah.