#include using std::cout; using std::endl; struct base { virtual void test() = 0; }; class derived : public base { void test() { cout << "private function... can not be called externally" << endl; } }; int main(int argc, char* argv[]) { base* bs = new derived; // call a private function, priave is not checked at runtime bs->test(); return 0; }