Variable Dependency

Here is the snippet of code I am having issues with.

[code]
cout<<"So are you a male or female, Please type m/f"<<endl;
cin>>sex;

if (sex='M','m')
{
alcohol_distribution=.73;
}
else if (sex='F','f')
{
alcohol_distribution=.66;
}
[code]

So I know I have this terribly wrong, but i want the alcohol_distribution based on whether or not the user is a male or female. thank you very much for any help.
You need to

1) use == for comparison. Remember, = is for assignment only.
2) If you want multiple conditions, use the boolean operators (||, &&, etc)
Topic archived. No new replies allowed.