Exercises

To help you test your knowledge of this chapter's content, here are a few exercises that you should work on. They are not imperative to the rest of the book, but working on them will help you assess your strengths and weakness on the material covered.

  1. Create a name for your game and change the text of the main window to reflect this change.
  2. Consider the following code:
    class A
    {
    public:
        int x;
    protected:
        int y;
    private:
        int z;
    };
    
    class B : protected A
    {
      
    };

    What is the visibility of x, y, and z in class B?

  3. Add more items to the level.

Get Procedural Content Generation for C++ Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.