Some c++ hacking