R
responsible
Hi,
Assume I have the following class
class test{
public:
int x;
test(){
x = 5;
}
private:
test(test& v){
x = v.x;
}
};
now, i need to create a pair of this object
pair<test,test>(??,??)
what should I put in the constructor to allow me to construct such a
pair? All attempts fail because copy constructor is disallowed.
Thank you very much
Assume I have the following class
class test{
public:
int x;
test(){
x = 5;
}
private:
test(test& v){
x = v.x;
}
};
now, i need to create a pair of this object
pair<test,test>(??,??)
what should I put in the constructor to allow me to construct such a
pair? All attempts fail because copy constructor is disallowed.
Thank you very much