C++ I need help finding pairs of two inside a string [closed]

  arrays, c++, search, string

I was working on finding frequency/occurrences of stuff inside a grocery list , then I decided to find the occurrences of pairs inside the string but I have tried different approaches and had no luck in doing so.

ETC Lets suppose string has this value=
Paratha Makhan Anda Sharbat n
Paratha Makhan Sharbat n
Paratha Doodh Dahi n
Paratha Sharbat Doodh n
Makhan Sharbat Doodh n
Paratha Anda Makhan Sharbat n

I am able to find occurrences of each item inside the string but facing the issue with the pairs , I need to find the occurrences of pairs like etc.
Paratha Makhan = 3
Paratha Sharbat = 4

Source: Windows Questions C++

LEAVE A COMMENT