Suppose I have this type:
struct T
{
SomeType a;
OtherType b;
};
I think there is some way to declare an object of type T
and defining the initialised values of a
and b
in line, but I can't remember how this worked, or even what it's called so I can look it up. Something like T t(a, b)
where a
and b
are of type SomeType
and OtherType
respectively.
How do I achieve this without declaring a constructor, and what is it called?