Can't declare a variable in a for-loop with the same name as a variable declared in the for loop initialization

[SVN r12775]
This commit is contained in:
Douglas Gregor
2002-02-09 16:37:56 +00:00
parent 98377b57aa
commit 44d33b20d5

View File

@ -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;