0

Out of below 2 typecasting which one is preferred/better to use in a C++ code and why ?

unsigned char var = 10;
unsigned int value;
value = static_cast<unsigned int>(var);   //typecasting 1 
value = (unsigned int)var;                //typecasting 2
Jack
  • 694
  • 8
  • 20

0 Answers0