November 2001
Beginner
1128 pages
29h 12m
English
Actually, you don't have a choice. Although prototyping is optional in C, it is mandatory in C++. Note that a function that is defined before its first use, such as an inline function, serves as its own prototype.
Do use const in function prototypes and headers when appropriate. In particular, use const with pointer parameters and reference parameters representing data that is not to be altered. Not only does this allow the compiler to catch errors that change data, it also makes a function more general. That is, a function with a const pointer or reference can process both const and non-const data, while a function that fails to use const with a pointer or reference only can process non-const data.
Read now
Unlock full access