Quantcast
Channel: Unknown type name error when inserting into unordered_map - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Bo R for Unknown type name error when inserting into unordered_map

Your std::make_pair is wrong. To get closer you need a std::set<int> instead of the std::set.But what you really want is to just let to compiler make it for you:...

View Article



Answer by vmp for Unknown type name error when inserting into unordered_map

I don't know why it is not working, but you don't need to call make_pair...Changing the insertion line to:firstSets.insert({decl, declFirstSet});Should solve your problem.Here would be a full code...

View Article

Unknown type name error when inserting into unordered_map

I have a single file called main.cpp where I am trying to declare an unordered_map as shown below.std::unordered_map<std::string, std::set<int>> firstSets;I then try to insert a new (key,...

View Article
Browsing all 3 articles
Browse latest View live


Latest Images