vendredi 21 octobre 2016

selected expiry dates using map C++

Can we solve below problem using maps in C++? I already tried using maps but not getting.

#include <iostream>
#include <map>
int main ()
{
  std::map<char,char> first;
};

Expiry codes: H16,F17,C45,D11,F45,E12,R34,T12 Contract Codes: OE : H16,R34,T12 ES : F17,H16,C45,D11 LM : F45,E12,R34,T12 CFS : H16,D11,E12,R34

Whenever user inputs any expiry code then it should show in how many contracts that expiry date is present?

Suppose user inuts : H16 then output should be : OE,ES,CFS

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire