error conversion

Hi

I have compiled this code.
gives a lot of mistakes.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

struct X{
	int x;
	X(int);
	operator+(int);
};

struct Y{
	int i;
	Y(X);
	operator+(X);
	operator int();

};


X x = 1;
Y y = x;
int i = 2;

extern X operator*(X,Y);
extern int f(X);

int main()
{
	i + 1;      y + 10;     y + 10 * y;

	x + y + i;	x * x + i;  f(7);

	f(y);       y + y;      106 + y;

        return 0;
}



It actually compiles?
Topic archived. No new replies allowed.