Add some comments to the code. Naming in C++ can be complicated given that the user may not pass all the names.
All output columns are given default names and then the names of the state variables and observed variables are added (if supplied).