I'm having a problem here.
I want my program to print different texts depending on the user input.
std::string username;
void whoareyou()
{
std::cout << "Name: " << std::flush;
std::cin >> username;
if (username == "Jack", "jack", "jak")
{
std::cout << "Hello jack, how are you?" << std::endl;
}
else if (username == "Bob", "bob", "bbob")
{
std::cout << "Hello Bob, how are you?" << std::endl;
}
else
{
std::cout << "I don't know you, bye." << std::endl;
}
}
Every time I input bob's code the program runs jack's. How do I fix this? I plan to add more users to this.
Thank you in advance.