Using Multiple Source Files

Real programs rarely fit into a single source file, and I know you’ve been champing at the bit, eager to explore how C++ works with multiple source files that make up a single program. This Exploration shows you the basics. Advanced techniques, such as shared libraries (DLLs, shared objects, etc.), are beyond the scope of this book and sometimes involve compiler-specific features that extend the language beyond the standard. You have to consult your compiler documentation for details.

Multiple Source Files

The basic principle is that you can define any function or global object in any source file. The ...

Get Exploring C++ 11, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.