W
Wolfgang Jeltsch
Hello,
I can initialized, e.g, heap-allocated ints by writing something like
new int(5).
Now I'd like to know if it is possible to do the same thing for struct
types. Say, I have a struct declared by the following lines:
struct S {
int i;
const char c;
}
I want to write something like
new S {5, 'd'}.
Is this possible?
Wolfgang
I can initialized, e.g, heap-allocated ints by writing something like
new int(5).
Now I'd like to know if it is possible to do the same thing for struct
types. Say, I have a struct declared by the following lines:
struct S {
int i;
const char c;
}
I want to write something like
new S {5, 'd'}.
Is this possible?
Wolfgang