I am reading TCPPPL by Stroustrup. An exerxise in the book goes somewhat like this:
struct X{
int i;
X(int);
X operator+(int);
};
struct Y{
int i;
Y(X);
Y operator+(X);
operator int();
};
extern X operator* (X,Y);
extern int f(X);
X x=1;
Y y=x;
int i=2;
int main()
{
//main body
}
My question (maybe a trivial one) is that what is happening in the line: X x =1;? Is a variable x of type struct X being initialized, i.e. its i is being given the value 1? If so, why are there no curly braces around 1?