Can an object of a class be declared as a pair data type in C ++? I have been searching but I have not found much, I have tried to apply it in my code but it does not come out, eg:
This is the code:
char tag ='A';
point p(p.get_x(),p.get_y());
Nodo a(p,0);
pair<Nodo&,char> nodo1; //donde me sale el error
nodo1.first = a;
nodo1.second= tag;
And this is the error:
error: no matching function for call to ‘std::pair<Nodo&, char>::pair()’
pair<Nodo&,char> nodo1;
^~~~~
I have declared all the necessary libraries.
Thank you for your help, thank you