Home Segments Index Top Previous Next

101: Sidetrip

You can leave out the declaration of a function's return value data type if that value is to be an integer, because if there is no data-type specifier, the C++ compiler assumes, by default, that the returned value is to be an integer. Generally, however, most good programmers declare the return data type for every function, except for the main function, as explained in the hardcopy version of this book.