TIL C++ has exception for main function to be without return even though they forced it to have int return type. Can someone explain to me why this was done? C was happy with void return type but C++ forces int, yet implicitly adds return 0 if missing.
So as to avoid accidentally returning a random (bad) status code for the whole process in the case where no explicitly return is coded. Equivalent to allowing a void return type in C I guess, but maybe less smelly given that the process does actually return something, typically, eg in POSIX environments.
no idea why it was done, but iirc people still wrote it until gurus started emphasizing that you shouldn't around c++11. around that time there was a strong push to differentiate code from looking like "C with classes"
Try look for local FabLab or Maker/Hacker Space. People in there are usually willing to share their knowledge or they are even organizing some courses on that topic.
Either way, it's mandatory to understand electronics essentials (Ohm's law, Kirhoff's laws etc.) Try to find some electronics schoolbooks (I can provide something in czech only). After understanding basics, you can start with buses and digital communications (because digital is actually two level analog, right?)