Read input from std::cin instead of argv[].