July 2000
Intermediate to advanced
1280 pages
34h 55m
English
C++ functions can return built-in values, pointers, references, and objects. They cannot return arrays, but returning pointers allows you to simulate returning arrays. Built-in values can be used as rvalues only. Other return types (pointers, references, and objects) can be used as lvalues. This opens the door to quite interesting idioms in the source code. These idioms contribute to the expressiveness of C++ programs but sometimes make the source code more difficult to understand.
The material in this section can be easily skipped in the first reading, even though the programming idioms I am discussing here are quite common.
I will start with the discussion of simple (noncomposite) ...
Read now
Unlock full access