Moschops is right.
'=' is a assignment operator whereas '==' is a relational operator.
when u write 'a=b' u actually assign the value of a as b.
But when u write 'a==b' u actually check the relation if a's value is equal to b.
so u should be using while (quit=='n')