Well I've seen it in another scripting language. But I don't know if it is possible in C++?
Do yourself a favor and don't treat C++ like whatever other language you know, and especially don't try to make it do things the way they were done in that language.

"Running a class" is something that makes no sense in C++. What it sounds like you want is functions.