The error says that it has too many characters in the constant. If I delete the "t" letter, it works. So it is working only with 4 characters but not 5 or above. I need it to work for long WORDS too, not only short ones.
dude i know that it works how you replied, but I want for it to work for long words too, not just a single character, is there another type that I should use instead of char or what?
So you need to use char data type while simultaneously being able to work with multi-character strings? Sorry, you can't have both. Either stick with single character (i.e. char data type), or simply switch to string.
Note that switch statements don't work on std::string. So if you do decide to go with strings, you'll have to change switch-case to if's and else-if's
a simple example would be life-changing :p
because I am trying to use if and else for string type but it says expression must have bool type (or to be convertible to bool)