class A { //statements of class A }; class B:public A { //inherting class B from class A //statements of class B };