stpcpy.3: Add missing pieces/fix various problems in example program

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2009-02-03 10:25:32 +13:00
parent b6898014c5
commit 56e50303bb
1 changed files with 4 additions and 0 deletions

View File

@ -59,12 +59,16 @@ to concatenate \fBfoo\fP and
.in +4n
.nf
#define _GNU_SOURCE
#include <string.h>
#include <stdio.h>
int
main(void)
{
char buffer[20];
char *to = buffer;
to = stpcpy(to, "foo");
to = stpcpy(to, "bar");
printf("%s\\n", buffer);