Hello there. I recently have been teaching myself C++ and have come across something that I just can't seem to grasp. I undersatdn the basics of structures but when it comes to this nesting type situation I just can't figure out what is going on. If someone could explain in a somewhat simple manner it would help me greatly
Here's the code:
#include <iostream>
using namespace std;
struct sct {
int t[2];
};
struct str {
sct t[2];
};
int main(void) {
str t[2] = { {0, 2, 4, 6}, {1, 3, 5, 7} };
cout << t[1].t[0].t[1] << t[0].t[1].t[0];
return 0;
}
The output is 34 but I honestly can't figure out why! Thanks in advance any help would be greatly appreciated!