This rule is Obsolete | |
Synopsis: | Always specify the return type of a method/function explicitly |
Language: | C++ |
Severity Level: | 5 |
Category: | Class Interface |
Description: |
Methods or functions, for which no return type is explicitly declared, implicitly receive int as the return type. This can be confusing for a beginner, since the compiler gives a warning for a missing return type. Methods or functions that do not need to return a value should specify void as the return type. |
Literature References: |
Ellemtel Rule 33 |