I haven't updated the blog much for a while - not only because of the fall trips. I still have not managed to solve the Visual problem on my computer, but I've been able to use my mom's for the time being - for the exercise programs. I've already done a few - suggested as practice in the end of the first chapter of the tutorial (3.1) which I have studying. I've crated the following programs:
- "computer die" - Random number picked from 1-6. Uses windows message boxes, like the one on the right.
- "Garfield" - a little sequential interactive program that also uses message boxes. The outcome depends on the decision of the user.
- "Click" A window. When you clock it it tells you you did so with a... message box :D.
Maybe it doesn't look impressive. But what it is, is the introduction to the Windows API - the structures of Windows' windows and how to use them. I also refreshed myself on the use of the random function - very useful for games. Following the style of programing used in "Garfield" I could easily program any sequential "game" - like many quizzes found in magazines (set of questions where the answer leads to a next question until some kind of an end box is reached).
While writing those little programs, I've already came across some of the most common problems which I will surely encounter again while writing my final game. One of them was a single line I've missed in a complex structure - unfortunately it was important enough to fail the whole application. It was also a mistake that the Visual C++ Program did not find - like it does with simple typos and incorrect type usage. It took line-by-line comparison to find the mistake. Later on in bigger projects I will try to include crash prevention and notification scripts (so called exceptions).
Some other problems I encountered were needing me to do a further research into specific queries on MSDN (the ultimate C++ documentation :)) which were not described in the tutorial. Again, I am sure I will be doing that over and over when creating the final program - it is one of the specifics of programming. It is good I'm already getting practise with that and I'm getting used to using MSDN and its documentation style.
There is one more practice program to do - a window that makes sure you really want to exit (a prompt like in most of programs, e.g. Word). After that I will hit the 3.2 chapter.
[UPDATE]
I have finished the last program - it only required me to research a specific function and apply it. Now I'm going through the 3.2 chapter.