A few problems.
Your using chars, but looking for a string. You declare the char variables, but don't assign them to anything, and you also looking for a tie. I got your code working, but had to change a few things.
That's because each time you run the program, rand() uses the same sequence of numbers. Try adding #include <ctime> after #include <string> , then put srand((unsigned)time(0)); right after int main() {