I defined the following struct:
struct Color {
unsigned int r, g, b, a;
};
Is there a way to cycle through its elements like:
Color c;
for (unsigned int i "in all struct elements") {
c.i = 0;
}
So that, after that, all 4 unsigned int in c are set to 0?
Color c = {};? "Reset" using assignment asc = {};? Plain old setting bytes of memory asstd::memset(&c, 0, sizeof c);?