A variable is an abstract storage location paired with an associated symbolic name, which contains some known or unknown quantity of information referred to as a value
The scope of a name binding is the portion of source code in which a binding of a name with an entity applies
static or an anonymous namespacestatic or an anonymous namespace| Description | Command |
|---|---|
| Compile to Assembly | g++ -S overloading.cpp |
| Compile to x86 Assembly on Apple Silicon Mac | g++ -target x86_64 -S overloading.cpp |
| List symbols in object file | nm overloading |
| Demangle a symbol | c++filt __Z6actioni |
| Demangle all symbols in object file | nm --demangle overloading |
| Symbol | Definition | Description |
|---|---|---|
| U | Undefined | External storage, found during linkage |
| D | Data section | Stored locally, available globally |
| d | Data section local | Stored locally, available locally only |
| T | Text (code) section | |
| S | Another section | Uninitialized or zero-initialized data section for small objects |
extern specifiermain() functionA good way to improve a design is to minimize scope whenever possible
| Concepts | Attributes | Notes |
|---|---|---|
| First name | value |
|
| Middle name | value |
|
| Last name | value |