Table of Contents
- Introduction
- Separate Compilation
- Modules
- Namespaces
- Error Handling
- Function Arguments and Return Values
3.1 Introduction
- What is the difference between a declaration and definition in C++?
- Can you have multiple declarations for a function/type?
- Can you have multiple definitions for a function/type?
3.2 Separate Compilation
- What is the purpose of header files (
.h
)?
- What is separate compilation in C++?
- What are the arguments for taking advantage of separate compilation in C++?
- What is a translation unit in C++?
- What is an include guard**, and why is it needed? Show an example with**
class Vector { /* ... */ };
- What is
#pragma once
, and how does it differ from include guards?
- How does the linker resolve function calls across multiple translation units?
- When should you not inline a function?