why in a child class def do we not use ()'s after the parent, but in the construct we do?
Code:class fun: public firecrackers{ //...... fun::fun: firecrackers()
why in a child class def do we not use ()'s after the parent, but in the construct we do?
Code:class fun: public firecrackers{ //...... fun::fun: firecrackers()
class fun: public firecrackers{ // class fun is derived from class firecrackers
//......
fun::fun: firecrackers() // illegal
// should be
fun::fun() :
firecrackers() // call firecrackers default constructor
hey, SS, you're right i just missed the fun(). but you didn't answer answer why we don't put the firecracker() in the class def but in the constructor.