Doubt in pair class

Hello, this is a question from the algorithms stl quiz. I want to know the difference between all first three options. Could you please help me ?

We wish to design a data type that can be used to hold a string, an integer, a double and a pointer to an integer.

Which of the following can be used as an alternative to above required data type.

typedef pair< string, pair< int, pair< double, int * > > > myDataType

typedef pair< string, pair< int, pair< int, int * > > > myDataType;

typedef pair< string, pair< int*, double > > myDataType;

None of these.

Hello @yashsharma4304 the correct option for this is 1st.
if you have any doubt in understandig please replt so that we can discuss.

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.