I'm having trouble with my code. It compiles fine, but one of my if conditions isn't being recognized at run time. The issue is that if I type "computer science" in the terminal, it doesn't recognize it and outputs "That's cool! Mine is computer science." instead of the "mine too..." string.
Feel free to comment on any other issues (bad practice etc) if you see them. I'm pretty new to C++ and open to criticism. Roast me.
1 2 3 4 5 6 7 8 9 10 11
cout << "What is your favorite subject? ";
cin >> fav_subject;
if(fav_subject == "computer science")
cout << "Mine too! I am, after all, a computer!\nGoodbye\n";
cout << "That's cool! Mine is computer science.\nGoodbye!\n";