EXPLORATION 41

image

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 books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.