Would it be possible to use the cin.get function to do this as well ?