Simplest way to implement FIR filter in C/C++
Have you considered using the Parks McClellan algorithm to generate your FIR filters. The source code for it is available on several sites in Fortran or C.

The original Fortran code is available on Wikipedia.

Here are two sources for C code


Github/scipy 
Iowa Hills


You said you were trying to understand filters, so let me explain that the Parks McClellan algorithm is a classic. It was developed in the early 70's, and is still considered to be one of the best FIR design algorithms available.