Struggling with user-defined custom c++ function for binning real data into sequence of integer counts

If you want to try using the newer versions, you can find instructions here: Rstan Versioning - #2 by rok_cesnovar