It is worth noting that the source code for the C standard library does not necessarily highlight good coding methods. As a standard library, it has a special status, where, for example, it can rely on many unspecified or non-portable actions simply because they know the exact compiler with which it is used.
And, of course, this only talks about C encoding methods.
This has nothing to do with C ++ coding practice, which is very different. Do not treat them as one language. There is no such thing as C / C ++. C is a language with its own coding methods and common idioms, and C ++ is a separate independent language that also has its own practices and idioms.
Good C code is rarely good C ++ code. strcpy and other C library functions are certainly not good C ++ code.
jalf Jul 14 '09 at 19:17 2009-07-14 19:17
source share