If the EAN code is used as a key then for a .Net Dictionary you can use the ContainsKey method and in a Standard C++ library map object you could use the find method
C++, MFC, check two list, best way
Hello,
I have a default list and must check whether all values are contained in my dictionary map.
A) Are all default values available in my dictionary? Yes or no?
B) Are all the default values exactly in my dictionary? It has to be exactly the same.
How can I best solve the problem. With map, dictionary, vector or something else
Thanks in advance for examples.
Developer technologies | C++
Developer technologies | .NET | .NET CLI
2 answers
Sort by: Most helpful
-
-
Petrus 【KIM】 546 Reputation points
2021-11-18T07:14:10.627+00:00 How about ...
ATL::CAtlList<int> oValueList;
ATL::CAtlMap<int, int> oValueCountMap;int nCount = oValueCountMap.Find(1234567890);
When you create the "Current List, Dictionary" with std::map or ATL::CAtlMap,
just count, how many value in that.
Then insert or add the key(value) and Count to "oValueCountMap"...You can find the count.