# _CP_heading

_CP_heading is equivalent to the `heading *string*` BASIC statement.

## Syntax

```
int _CP_heading(CPSTR* string)
```

## Description

This function returns -1 if
an error occurs. The error code is contained in _CP_errno. If the heading is too long, _CP_errno will contain PE_LONG_STR.

Note: Heading and footing only work properly
if all output is done through _CP_ calls.

## Example(s)

```
/* Sets the heading to "heading". */
CPSTR * s = _CP_mkstr("heading");
_CP_heading(s);
```

## See also

- [C functions overview](https://d3codex.com/cfunctions/c-functions-overview/)

---
Source: https://d3codex.com/cfunctions/cp-heading/ - part of the D3Codex reference.
