When I enter start then the program outputs the else function even though I fulfilled the criteria, I have tried with && as well and it still didn\'t work. Any answe
if (input.find("end" || "End") != std::string::npos) // ^^^^^^^^^^^^^^
The || operator is not being used correctly here. The righthand expression will return true because it is non-zero, then it will be returned. So the statement resolves to input.find("end"). You need to use two separate conditional statements there:
if (input.find("end") != std::string::npos || input.find("End") != std::string::npos)