Include <stdio.h>. Declare BUFFER. Use puts in place of printf.
authorroland <roland>
Mon, 30 Aug 1993 20:46:38 +0000 (20:46 +0000)
committerroland <roland>
Mon, 30 Aug 1993 20:46:38 +0000 (20:46 +0000)
manual/examples/stpcpy.c

index bbacd9a..b832263 100644 (file)
@@ -1,10 +1,13 @@
 #include <string.h>
+#include <stdio.h>
 
 int
 main (void)
 {
+  char buffer[10];
   char *to = buffer;
   to = stpcpy (to, "foo");
   to = stpcpy (to, "bar");
-  printf ("%s\n", buffer);
+  puts (buffer);
+  return 0;
 }