Pitfalls in Using a Standard “Global” C++ Function: Its C Counterpart May Be Camouflaging
A large number of C++ functions in the standard library are extended from standard C functions, such as qsort(), memcpy(), etc. Among these functions, many have overloaded their C counterparts. For example, abs() in C++ is overloaded for both integral and floating-point types, while it is only defined for int in C. These functions, however, […]