Synopsis: | If a method/function has no formal parameter, do not use the keyword void |
Language: | C++ |
Severity Level: | 9 |
Category: | Style |
Description: |
In C a function prototype without any parameters means that the function parameters are not specified. The void keyword is used in C to indicate that the function has no parameters. However, in C++ a method or function prototype without any parameters means that the method or function does not have any parameters. The void keyword is no longer needed. |