O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The C Language Library

All the definitions that you’ve seen for C libraries are also included under C++, so most programs that work under C can be easily ported to C++. To differentiate the old C header files from the newer C++ versions, the newer versions are renamed in ANSI-compliant C++ build environments.

The header files can be accessed by looking for files with the old name, except with the character c in front—that is, stdio.h becomes cstdio.h. Other than that, the function names inside remain the same—sprintf is still sprintf—but most of the functions have been replaced with pure C++ equivalents.

As much as possible, you should use the C++ Standard Libraries with C++ programs, rather than reuse the old C functions. Part of being able ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required