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

Rule:  OLC#004Checked automatically with code checker

Synopsis:Every variable that is declared is to be given a value before it is used
Severity Level:1
Category:Object Life Cycle


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:

SHORT number = 10;


SHORT number;


number = 10;

This rule can be checked by most modern compilers, including the Microsoft Visual C++ compiler.

Literature References:
Ellemtel Rule 40