Learn C and C++ language, including Win API, Gaming, AI, Networking, and GUI programming.

C++ Structures

C++ Structs

Structures allow programmers to define their own type of data by grouping together several types of variables. They are extremely useful when you need to aggregate different variables of different types to represent a composite object.

Bitwise and Flags

Some functions want to save parameters and have only a single parameter that takes in binary bits and the parameter can determine all sorts of flags from this. The MessageBox function takes numerous flags that can be OR'ed together.

You might be wondering, how does the MessageBox function know which styles I've just passed to it?

Introduction to C++ Templates

This tutorial will give you a quick introduction to C++ templates. You will not be a template guru after reading it but you will be able to understand a lot of the "templated" code that's out there.

C++ Variables and Data Types

What are variables? Variables are like shortcuts. Nobody wants to type the number "3824473021" hundreds of times in a program, so we make shortcuts. A variable is really a sequence of memory which can store data and can be called back by using the variable name.

C++ Constants

A constant is a variable type which cannot be changed during run-time of a program. Once it has a set value, it stays that way until you change your code. There isn't much to constants, but they can cause errors that aren't explained well in your IDE.

Basics of Vectors in C++

A vector is a basically a list or container of any type of a data type you want. If you're making a game it could be good for an inventory type list. But what a vector really is, is a sequential STL (Standard Template Library) container. There are many things you could use vectors for, but I'm going to use it for a list of numbers: 1,2,3, and 4.

C++ Operators

First of all, what is an operator? There are multiple types of operators, but in this tutorial we'll only talk about 2 types. The first type includes arithmetic operators such as addition, subtraction, multiplication, and division. The second type includes equals, greater than, and other comparison testing operators.

Syndicate content