File Divider

Best Practices

Keep a clear and logical distinction between struct and class:
only PODs are to be declared as struct.

Deprecated Features

typedef, NULL (replace with using, nullptr)

Caveats

std::abs() from <cmath> operates on floating-point types;
you probably meant the integer-only version from <cstdlib>.
This is a dangerous function: if you accidentally include the wrong
header, both an integer argument and the double result may get silently
cast to a double and integer, respectively, without any emitted compiler
warnings even at -Wall-Wextra.
Best to avoid using this function; just use e.g. std::labs() instead.