first draft of a cpp example, adapting from the Advanced topics in pomp vignette