From 9fc64bbc95bb4e55f28f5262d0f5c660177f0a19 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 18 Feb 2015 14:46:30 -0800 Subject: 781 - first instruction to run in literate C++ version --- cpp/literate/011load | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cpp/literate/011load') diff --git a/cpp/literate/011load b/cpp/literate/011load index 4bc73365..f2855e5f 100644 --- a/cpp/literate/011load +++ b/cpp/literate/011load @@ -9,7 +9,7 @@ recipe main [ +parse: product: {name: "1", type: 1} :(code) -void add_recipe(string form) { +int add_recipe(string form) { istringstream in(form); in >> std::noskipws; @@ -29,8 +29,9 @@ void add_recipe(string form) { instruction curr; while (next_instruction(in, &curr)) { - Recipe[r].step.push_back(curr); + Recipe[r].steps.push_back(curr); } + return r; } bool next_instruction(istream& in, instruction* curr) { -- cgit 1.4.1-2-gfad0