---
name: "pack_fwrite"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/pack_fwrite"
---

# pack\_fwrite(3alleg)

Writes n bytes to the stream. Allegro game programming library.

## NAME

pack\_fwrite - Writes n bytes to the stream. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**long pack\_fwrite(const void \*p, long n, PACKFILE \*f);**

## DESCRIPTION

Writes \`n' bytes to the stream \`f' from memory location pointed to by \`p'.

## RETURN VALUE

Returns the number of bytes written, which will be less than n if an error occurs. Error codes are stored in errno.

## SEE ALSO

[**pack\_fopen**(3alleg)](/pack_fopen/3alleg.md), [**pack\_fopen\_chunk**(3alleg)](/pack_fopen_chunk/3alleg.md), [**pack\_feof**(3alleg)](/pack_feof/3alleg.md)
