Protecting variables and functions within a library that has no class
If your library is implemented in a single .cpp file, you can define these
variables and functions within that file, and give them the static
qualifier:

static int my_private_variable = 42;

static void my_private_function()
{
    ...
}


Obviously, there should be no mention of them in the .h file.

Note also that we are talking about global variables. Local variables
are already hidden within the defining function.