Come acquisisci l'input? Se usi cin e in generale gli stream C++ dai un'occhiata qui.