by quietbritishjim · 1w ago · 0 comments
struct Params { int p1 = 1, p2 = 2, p3 = 3, p4 = 4, p5 = 5; };
void foo(Params p) {}
int main() {
foo({.p2 = 12, .p4 = 14});
}
They have to be in the correct order though: // Not allowed
foo({.p4 = 14, .p2 = 12});No comments yet.