Use fflush before the cin and that should work.