Classes, inheritance and the pureness of a virtual class

Hello, I’m back.

So over the last two weeks we’ve finished the introduction part of the course, and I am now in uncharted territory. I’ve learned more about classes, which I knew a little bit about before but not too much, and I am now a master of class inheritance and pure virtual classes! No, just kidding, it still is a bit confusing from time to time, especially when dealing with pointers and arrays that are filled with pointers that point to another class, but I am getting a hang of it.

We had an exercise were we where to make a poker game using classes, and I struggled with this program for a while. I especially had problems with the part where I had to fill a Deck-class with the Card-class, and I tried different solutions, searched the internet for advise and asked some classmates but I did not progress, until I asked a guy from the second grade for help. He helped me a little to better understand how to use pointer in order to reach other classes, and I was able to continue my work on the poker game. In the future, I am going to ask for help sooner rather than later, if I get stuck since I spent a little too much time trying to figure out the solution on my own.

Last week we’ve been doing “Live coding” in class, where the teacher codes and we all copy what he types and we then he explains everything. We are using the SDL library and we’re coding the basics of the Arkanoid game. Yay, I’m making a game, sort of… Either way, at times it is confusing to say the least, but the more I program the more I understand, of course.

About Johan Holmér

2014  Programming