Maybe this is just overwhelming you.
Just start with the first line of main: What does
foo bar(0xe8e711395e65686d);
do? It creates a variable named bar, which has type foo, and a constructor is called with a parameter 0xe8e711395e65686d. So what does this do?
Reading the comment of Mooing Duck: What is it intended to do, and how do you fix it so that it will do what it is intended to do?
You have two for-loops:
for (int i = 1; i <= 10; i++)
for (int i = 1; i <= 8; i++)
Both contain the same beginner’s mistake. What is the mistake? Fix it.
At last in the output loop, you need to understand what a union is. The code is weird, but you should still be able to explain what it does.
solved What is this code doing& [closed]