Completed Section 2 but could use some clarifications on working with the files

Hello everyone,

So I just completed Section 2 and after that I wanted to go back a bit to simply go through the code trying to make sure that I understand well how everything works and why we do certain things. I’m not good at programming so apologies if some of my questions are a bit basic.

So, one of the first things that I started to wonder was the files and structuring as in what actually happens in the header file, what happens in the main.cpp and what happens in FBullCowGame.cpp. In the polishing stage we commented on these files but it still left me a bit unsure of the structuring and functionality.

If I understand correctly, the header file is supposed to work as a high hierarchy file where we should only do declarations (this was mentioned as a rule of thumb on one website) and not really define anything in that file? (however I think we defined the BullCowCount there, if it is called a definition when a value is introduced?). Also I guess it contains the game logic in a very basic way by presenting needed declarations.

The main.cpp file as I understand contains the basic interaction (inputs and outputs) and not really any game logic as main implementation and game logic is done in the FBullCowGame.cpp?

I’m asking these questions because about in the middle of the section I noticed that I had some trouble with the challenges because I didn’t understand where I should be starting with the problem I had to solve. Later the section went I started to grasp more of where I should be starting and working my way from top to bottom. However, would be nice to get some kind of clarifications on this so I could create some kind of a rule set for myself on how to continue in the future when it comes to starting a new project and starting programming for it.


Privacy & Terms