For the complete documentation index, see llms.txt. This page is also available as Markdown.

🕵️Header File

In cpp, header files are used at compile time to resolve references, share common code and declare variables.

Example:

// math_operations.h
#ifndef MATH_OPERATIONS_H
#define MATH_OPERATIONS_H

int add(int a, int b);
int subtract(int a, int b);

#endif
// math_operations.c
#include "math_operations.h

int add(int a, int b) {
    return a + b;
}

int subtract(int a, int b) {
    return a - b;
}

Last updated