Fall-through in switch cases is often considered risky.
Hence consider adding an unconditional break
for each switch clause.
Default case provides switch statements with fallback, and in general is a good to have. Hence consider adding default case to switch.
*
, "
, '
, \
and /*
found in header names CXX-W1207Using special-meaning characters in header names can produce errors in parsing.
Consider cleaning up header names.
for
loop modified in body CXX-W1241Modifying the control variable of a for
loop in its body can make the code harder to read.
Consider using a while loop, or move the modification into the for
loop's update expression.
Raw string literals are used in C++ to avoid using escape characters. They can be used to express all types of string literals. A raw string literal enables you to express a string without having to perform extra construction or conversion steps. For example, if you want to express a string that contains a backslash, you can use a raw string literal to avoid having to escape the backslash.