use getline instead of istream::operator>> to read the input

Just in case anybody else has the crazy idea of using C++, this patch fixes the bug in the framework that the input is only read up to the first space (first whitespace character).