TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C++ Coding Standard
Search

Rule:  OLC#004Checked automatically with code checker

Synopsis:Every variable of a built-in type that is declared is to be given a value before it is used
Language:C++
Severity Level:1
Category:Object Life Cycle


Description:

This value can be assigned in the declaration or later on, as long as a variable is assigned a value before it is used.

Some examples:

int number = 10;

if (func(number)) ...

or

int number;
...
number = 10;
if (func(number)) ...

This rule can be checked by most modern compilers.



Literature References:
Ellemtel Rule 40