Beginning C++ Through Game Programming, Fourth Edition
by Michael Dawson, 2015
- Chapter 1: Types, Variables, and Standard I/O: Lost Fortune
- This book is for beginners, but that doesn't mean learning C++ will
be easy.
You'll have to read, work, and experiment.
- Although there are literally thousands of computer programming
languages, C++ is the game industry standard.
- 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.
- source code not found at: www.cengageptr.com/downloads 9781305109919
Ask for technical support.
- P.2 Why game programmers choose C++?
- It's fast.
- It's flexible. It supports object-oriented programming, and
many different styles.
- It's well-supported. There's a large pool of available
graphics APIs and 2D, 3D, physics, and sound engines.
- P.4 Errors
- 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.
- 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.
- 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.
- 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.
- little Endian, IEEE 754
- namespace