How can I assign array of two elements to two variables?
Here is example of my idea (no valid code):
getTwoValues() {
int a = 7;
int b = 5;
return {a, b};
}
int x, y = getTwoValues();
// Expected output: x = 7, y = 5
How can I assign array of two elements to two variables?
Here is example of my idea (no valid code):
getTwoValues() {
int a = 7;
int b = 5;
return {a, b};
}
int x, y = getTwoValues();
// Expected output: x = 7, y = 5