CB100

Notas, resueltos y tps de la materia Algoritmos y Estructuras de Datos
Index Commits Files Refs README
commit 10cb71c71cc1badc7e0850e85db5be34509e09d9
parent f10622a76012c07da28b6438fc6a4fe1f58d430a
Author: Martin Kloeckner <mjkloeckner@gmail.com>
Date:   Wed, 20 Mar 2024 02:30:57 -0300

Clear remaining characters after selection

On some terminals the remaining screen wasn't being cleared after a
selection was made. This commit adds an escape sequence to clear the
screen after the selection is made.

Diffstat:
Msolutions/ej11.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/solutions/ej11.cpp b/solutions/ej11.cpp
@@ -167,7 +167,7 @@ int main (void) {
         } else {
             mg = "You selected: `";
         }
-        cout << mg << menu[selected_item] << "`" << endl;
+        cout << mg << menu[selected_item] << "`\033[0J\n";
     }
 
     exit(EXIT_SUCCESS);