|
|
|
| Помогите, пожалуйста найти ошибку.
#include<iostream>
#include<set>
using namespace std;
struct my
{
int i;
my()
{
cout<<"default\n";
}
my(int ii)
{
i=ii;
cout<<"constr\n";
}
my(my&x)
{
i=x.i;
cout<<"copy\n";
}
bool operator<(const my& x)
{
return i<x.i;
}
};
void main()
{
set<my>x;
my a(5);
x.insert(a);//ошибка тут где-то
} | |
|
|