Ill give you a hint, your code right now gets a char(single), stores it then compares it. If it has nothing to compare to, it drops out. So you need to make it so that it does NOT drop out, but instead allows another char to be ADDED in, then compares it.
Afterwards you need to clear it.