This is a simple example of how a blockchain works (in C++).
It follows my video on blockchain here.
I'm in no way an expert in Blockchain. This is a very contrived and simple example. If you notice an error or anything that is amiss, feel free to submit a pull request. :)