H
Hitesh Patel
hi friends,
read following code and my problem.
class B
{
private:
public:
void fun1(void)
{
}
virtual void fun2(void) = 0;
};
class D : public B
{
private:
public:
void fun1(void)
{
}
void fun2(void)
{
}
};
Here class D is derived from class B. and overload both functions fun1() and
fun2().
but I want that if class D overload fun1() then compiler give error. I know
that in java if we make function as final then derive class never overload it.
but I don't found this type of facility in CPP.
if anyone has solution then please help me.
Thanks in Advance
read following code and my problem.
class B
{
private:
public:
void fun1(void)
{
}
virtual void fun2(void) = 0;
};
class D : public B
{
private:
public:
void fun1(void)
{
}
void fun2(void)
{
}
};
Here class D is derived from class B. and overload both functions fun1() and
fun2().
but I want that if class D overload fun1() then compiler give error. I know
that in java if we make function as final then derive class never overload it.
but I don't found this type of facility in CPP.
if anyone has solution then please help me.
Thanks in Advance