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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access