I am a beginner trying to become literate in C++ using the book written by the creator, Bjarne Stroustrup. I am trying to go through one of the examples and can't figure out what is wrong with my code.
Here is what I have:
1 2 3 4 5 6 7 8 9 10 11 12
cout << "Enter an m if friend is male and f is friend is female:\n";
char friend_sex = 0;
cin >> friend_sex;
if (friend_sex == m)
cout << " If you see " << friend_name << " please ask him to call me.\n";
elseif (friend_sex == f)
cout << " If you see " << friend_name << " please ask her to call me.\n";
else
cout << " If you see " << friend_name << " pleae ask them to call me.\n";
The errors I'm getting are saying that "m" and "f" are undeclared indentifiers. I guess it thinks that "m" and "f" are int variables.