From 44d33b20d52316eadfdd7bcd3248375ee04cf863 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sat, 9 Feb 2002 16:37:56 +0000 Subject: [PATCH] Can't declare a variable in a for-loop with the same name as a variable declared in the for loop initialization [SVN r12775] --- example/snippets/regex_grep_example_3.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/example/snippets/regex_grep_example_3.cpp b/example/snippets/regex_grep_example_3.cpp index 2712be0b..11fc36e9 100644 --- a/example/snippets/regex_grep_example_3.cpp +++ b/example/snippets/regex_grep_example_3.cpp @@ -122,12 +122,12 @@ int main(int argc, const char** argv) cout << "Processing file " << argv[i] << endl; std::ifstream fs(argv[i]); load_file(text, fs); - class_index i; - i.IndexClasses(text); - cout << i.get_map().size() << " matches found" << endl; + class_index idx; + idx.IndexClasses(text); + cout << idx.get_map().size() << " matches found" << endl; map_type::iterator c, d; - c = i.get_map().begin(); - d = i.get_map().end(); + c = idx.get_map().begin(); + d = idx.get_map().end(); while(c != d) { cout << "class \"" << (*c).first << "\" found at index: " << (*c).second << endl;