From 8e80aa4969d94bf634bdda885f7614b7af44d7ea Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Tue, 2 Dec 2014 01:34:39 +0100 Subject: [PATCH] Show the variable name when asking the user for some input. --- Nodes.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Nodes.cpp b/Nodes.cpp index f2d2515..3a33b50 100644 --- a/Nodes.cpp +++ b/Nodes.cpp @@ -167,6 +167,10 @@ void Print::emit(std::ostream &stream, int indent) { } void Input::emit(std::ostream &stream, int indent) { + stream << "std::cout << \""; + variable->emit(stream); + stream << "? \";\n"; + emitIndent(stream, indent); stream << "std::cin >> "; variable->emit(stream); }