From 1650570b0a5cdd0a7baaa0e813ad48a949351af4 Mon Sep 17 00:00:00 2001 From: Julian Daube Date: Sun, 8 Oct 2017 19:18:41 +0200 Subject: [PATCH] make readBrackets advance iterator again --- main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index b9a3835..29eccb8 100644 --- a/main.cpp +++ b/main.cpp @@ -59,10 +59,11 @@ std::string readTill(iterator &start, const iterator &end, std::function -std::string readBrackets(iterator &begin, const iterator &end, const char * brackets) { - auto current = begin; +std::string readBrackets(iterator ¤t, const iterator &end, const char * brackets) { +// auto current = begin; - if (begin == end || *current != brackets[0]) { + if (current == end || *current != brackets[0]) { + std::cout << brackets[0] << "!=" << *current; return std::string(); }