...
The following table summarizes some of the differences between const
-qualified objects, enumeration constants, and object-like macro definitions.
Method | Evaluated At | Consumes Memory | Viewable by Debuggers | Type Checking | Compile-Time Constant Expression |
---|---|---|---|---|---|
Enumerations | Compile time | No | Yes | Yes | Yes |
| Runtime | Yes | Yes | Yes | No |
Macros | Preprocessor | No | No | No | Yes |
...
In this compliant solution, the host name and port number are both defined as object-like macros, so they can be passed as compile-time arguments:
...
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
...