This post is based upon the standard - not supported with VC compiler ! Try these techniques using GCC / LLVM compilers and QtCreator / CLion IDEs
=
rather thanstrcpy()
for copying ,==
rather thanstrcmp()
for comparing- use
const
,constexpr
functions rather than#DEFINE
, macros - Avoid
void*
,union
, and raw casts (usestatic_cast
instead) - use
std:string
instead ofchar*