What game engine/library is TPT++ written in?
Engine, not programming language...
It uses SDL, but all the physics and the rendering of particles and UI is done by TPT itself rather than a separate engine. Source code for TPT is available at https://github.com/FacialTurd/The-Powder-Toy