Navigation



13.1 — Input and output (I/O) streams

Input and output functionality is not defined as part of the core C++ language, but rather is provided through the C++ standard library (and thus resides in the std namespace). In previous lessons, you included the iostream library header and made use of the cin and cout objects to do simple I/O. In this . . . → Read More: 13.1 — Input and output (I/O) streams

7.4a — Returning values by value, reference, and address

In the three previous lessons, you learned about passing arguments to functions by value, reference, and address. In this section, we’ll consider the issue of returning values back to the caller via all three methods.

As it turns out, returning values from a function to its caller by value, address, or reference works almost . . . → Read More: 7.4a — Returning values by value, reference, and address

7.14 — Ellipses (and why to avoid them)

In all of the functions we’ve seen so far, the number of parameters a function will take must be known in advance (even if they have default values). However, there are certain cases where it would be useful to be able to pass a variable number of parameters to a function. C provides a . . . → Read More: 7.14 — Ellipses (and why to avoid them)

7.13 — Command line arguments

As you learned in the introduction to development lesson, when you compile and link your program, the compiler produces an executable file. When a program is run, execution starts at the top of the function called main(). Up to this point, we’ve declared main like this:

int main()

Notice that this version of main() . . . → Read More: 7.13 — Command line arguments

12.6 — Pure virtual functions, abstract base classes, and interface classes

Finally, we arrive at the end of our long journey through inheritance! This is the last topic we will cover on the subject. So congratulations in advance on making it through the hardest part of the language!

Pure virtual (abstract) functions and abstract base classes

So far, all of the virtual functions we have . . . → Read More: 12.6 — Pure virtual functions, abstract base classes, and interface classes