Find all distinct combinations of given data in c++ [closed]

  c++, combinations, method-combination

I need to find all combinations of giving criteria:

Let’s say I have a fruits, vegetables, and shops.

fruits= ["orange", "kiwi", "apple"]
vegetables= ["tomato", "cucumber"]
shops= ["grocery market", "fruit shop", "supermarket", "minimarket"] 

Is there a simple function in c++ which will allow me to construct all possible combinations of the three character vectors.

Result:

tomato orange minimarket
cucumber apple supermarket
cucumber apple grocery market
...

I saw that it can be easily performed it python but I need to write it in c++?

Source: Windows Questions C++

LEAVE A COMMENT