Skip to Main Content
Professional C++, 6th Edition
book

Professional C++, 6th Edition

by Marc Gregoire
February 2024
Intermediate to advanced content levelIntermediate to advanced
1376 pages
40h 6m
English
Wiley
Content preview from Professional C++, 6th Edition

11Modules, Header Files, and Miscellaneous Topics

This chapter starts with a detailed discussion on how modules allow you to write reusable components and contrasts this against old-style header files. It also explains what preprocessor directives are and gives some examples of why C-style preprocessor macros are dangerous. The chapter then explains the concept of linkage, which specifies where named entities can be accessed from, and explains the one definition rule. The final part of the chapter discusses the different uses of the static and extern keywords, as well as C-style variable-length argument lists.

MODULES

Modules are introduced in Chapter 1, “A Crash Course in C++ and the Standard Library,” and you have already authored and consumed your own simple modules in previous chapters. However, there ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming: Principles and Practice Using C++, 3rd Edition

Programming: Principles and Practice Using C++, 3rd Edition

Bjarne Stroustrup
C++ Primer, Fifth Edition

C++ Primer, Fifth Edition

Stanley B. Lippman, Josée Lajoie, Barbara E. Moo

Publisher Resources

ISBN: 9781394193172