Skip to content
Marcus Ottosson edited this page Jan 11, 2015 · 6 revisions

Preprocessor

// Example
#include <stdio.h>
#include "my_header.h"

Preprocessors are a way of making text processing with your C program before they are actually compiled. Before the actual compilation of every C program it is passed through a Preprocessor. The Preprocessor looks through the program trying to find out specific instructions called Preprocessor directives that it can understand. All Preprocessor directives begin with the # (hash) symbol. These transformations are lexical, meaning that the output of the preprocessor is still text.

When including files, you can use both <> and "":

  • <> will look in default paths.
  • "" will use user_defined paths.

(Source)

typedef

typedef is a keyword in the C and C++ programming languages. The purpose of typedef is to form complex types from more-basic machine types and assign simpler names to such combinations.

Learn C/C++ for Film and Games.

Table of contents

Clone this wiki locally