Abraxas/ECS C++ Home  Table of Contents 

Module - 118.html

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

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

// 118. Use C++ casting operators instead of C-style casts.

int i = 1;
float j = 1.0;

// BAD 118, explicit old-style cast

i = (int) j;

// good 118

i = static_cast (j);

Abraxas/ECS C++ Home  Table of Contents

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