Technically we try and do this the first of the year, but time was not on our side. For one thing, Luba started school this past fall, so we have a lot of stuff to do with that. Also, I’ve been very busy as well. But, better late then never! This year I decided to introduce her to compiling…(she saw me compiling some server extensions and asked me why it was doing it by itself). So, I’ve been going back to my youth and playing around with c++ the past week (I am planning on getting back into application development) and so here is a cool little bit of code, daddy/daughter style.\n
If you are not familiar with the C languages, I am making use of a struct….this is essentially the same as a class. It’s declared a bit differently, but the end is the same. We created a person template in our structure and called two instances of it, yours and mine. The first time that we compiled, it just asked for name and age. Then we added the method to calculate the difference in the ages. Obviously we need more structure to make sure that if the first person is younger then the second it will still be correct, but for a bit of daddy/daughter time it suffices.
Fun was making mistakes and watching her see the compiler catch them! Damn I love raising a geek..I do not know what I would do if she were interested in stuff like sports…=)