(autosprintf.info)Using autosprintf


Prev: Class autosprintf Up: Top
Enter node , (file) or (file)node

3 Using 'autosprintf' in own programs
*************************************

To use the 'autosprintf' class in your programs, you need to add

     #include "autosprintf.h"
     using gnu::autosprintf;

to your source code.  The include file defines the class 'autosprintf',
in a namespace called 'gnu'.  The 'using' statement makes it possible to
use the class without the (otherwise natural) 'gnu::' prefix.

   When linking your program, you need to link with 'libasprintf',
because that's where the class is defined.  In projects using GNU
'autoconf', this means adding 'AC_LIB_LINKFLAGS([asprintf])' to
'configure.in' or 'configure.ac', and using the @LIBASPRINTF@ Makefile
variable that it provides.



automatically generated by info2www version 1.2.2.9