Hello Everyone,

I have the following problem that I can't solve and would appreciate the help. so the problem is the following.

Write a function that takes a set of distinct Strings as input and prints out all possible subsets.

For example, given input S=("Alice", "Bob", "Dave"), the function should output

(),

("Alice"),

("Bob"),

("Alice","Bob"),

("Dave"),

("Alice", "Dave" ),

("Bob", "Dave" )

("Alice", "Bob", "Dave")

Note that your function may display the subsets in order different from the above. For

simplicity, assume that the size of the set is no larger than 32

my attempt of theCode:#include<iostream> #include<string> #include<set> using namespace std; void DisplayAllSubsets(set<string> S)

I have no idea how I could use the set.h tools to output the combination shown in the problem. Any ideas, suggestion, or another container such as vectors that is implemented for this problem would be helpful.Code:void DisplayAllSubsets(set<string> S){ set<string>::iterator it; int count = 0; // may need it for finding the amount of combination for ( it = S.begin(); it != S.end(); ++it) { // Not sure how to proceed } }

Thank you for your time