You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
632 B

  1. From 185f73b1084936f85beddd4523a302cb1f906234 Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Mon, 7 Oct 2019 15:41:53 -0700
  4. Subject: [PATCH 4/4] support: flush cout in ReadString
  5. uClibc++ does not implicitly do this.
  6. Signed-off-by: Rosen Penev <rosenp@gmail.com>
  7. ---
  8. support.cc | 1 +
  9. 1 file changed, 1 insertion(+)
  10. diff --git a/support.cc b/support.cc
  11. index 1107993..891caad 100644
  12. --- a/support.cc
  13. +++ b/support.cc
  14. @@ -55,6 +55,7 @@ string ReadString(void) {
  15. string ReadString(void) {
  16. string inString;
  17. + cout << flush;
  18. getline(cin, inString);
  19. if (!cin.good())
  20. exit(5);
  21. --
  22. 2.17.1