Abraxas/ECS C++ Home  Table of Contents 

Module - 77.html

ABRAXAS SOFTWARE - CodeCheck ECS C++ Test-Suite ECS C++.

ECS C++-C Test Suite for Module - 77.cpp

/*

77. Create a zero-valued enumerator to indicate an uninitialized, invalid, unspecified, or default state.

*/
enum color {

// zero value, added zero intialization as comment

Default=0,     
red,
green,
blue
};
enum bad {
  

// bad NO Default, or None, ...

  red, 
  gree, 
  blue   
} ;

// false positive exclusion

enum foo;  

Abraxas/ECS C++ Home  Table of Contents

ABRAXAS SOFTWARE - CodeCheck ECS C++ Test-Suite ECS C++