Beginning C++ Through Game Programming, Fourth Edition

by Michael Dawson, 2015
  1. Chapter 1: Types, Variables, and Standard I/O: Lost Fortune
  2. This book is for beginners, but that doesn't mean learning C++ will be easy. You'll have to read, work, and experiment.
  3. Although there are literally thousands of computer programming languages, C++ is the game industry standard.
  4. In addition to learning about C++ programming, you'll also learn how to organize your work, break down problems into manageable chunks, and refine your code. You'll be challenged at times, but never overwhelmed.
  5. source code not found at: www.cengageptr.com/downloads 9781305109919 Ask for technical support.
  6. P.2 Why game programmers choose C++?
    1. It's fast.
    2. It's flexible. It supports object-oriented programming, and many different styles.
    3. It's well-supported. There's a large pool of available graphics APIs and 2D, 3D, physics, and sound engines.
  7. P.4 Errors
    1. Compile errors.
      • This is also called "syntax errors".
      • As a result, an object file is not produced.
      • At the beginning you may mostly be stuck by this kind of errors. However, you will find that they are the easiest ones to handle, because the compiler can detect them for you.
      • Compilers may issue "warnings", too. Although an object file is still generated, you should inspect the reasons which trigger the warning, and fix them.
    2. Link errors.
      • This indicate that something your program references externally cannot be found.
      • These errors are usually solved by adjusting the referenced function names or linking the right library.
    3. Run-time errors.
      • Even if your program is correct, it can crash at run time if divided by zero, or open a non-existing file.
    4. Logical errors.
      • These are the most difficult errors to find. Your program can run without crashing, but the result is wrong!
      • A good debugging tool may be helpful to identify the statements which cause the bug.
  8. little Endian, IEEE 754
  9. namespace