You know, "if(in>>c)" will always be true if 'input' is more that 1 characters long.