Special Characters
& has a number of distinct meanings. When it precedes the name of a variable without following the name of a type, it means “the address of the following variable”. For example, &Str means “the address of the variable Str”. When & follows a type name and precedes a variable name, it means that the variable being declared is a reference — that is, another name for a preexisting variable. In this book, references are used only in argument lists, where they indicate that the variable being defined is a new name for the caller's variable rather than a new local variable.
% is the “modulus” operator, which returns the remainder after dividing its left-hand argument by its right-hand argument.
:: is the scope resolution operator ...
Get C++: A Dialog Programming with the C++ Standard Library now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.