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 of a built-in type 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:

int number = 10;

if (func(number)) ...


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

This rule can be checked by most modern compilers.