** imp. I m getting an error in the following code

I have one condition consttruct,

i declared the variable of type string.
char chardata;

then i assigned a vale to it.
after this when i tried to check the following condition, its giving me an error.


if (chardata='A' && chardata='B')
{
}



what is the problem in this code , it is giving me an error,
that i can't compare a pointer and integer.
See http://www.cplusplus.com/forum/beginner/44357/ because it is the same error.
Topic archived. No new replies allowed.