#include<iostream>;
using namespace std;
class ABC {
public:
virtual void SUB() = 0;
virtual void SUB() = 0;
};
//interface and abstract method are same but one small changes
// abstract class VS interface
//cannot create object same
//in abstract cls at list 1 only virtual fun interface class
//virtual function define prototype or blue print of function
//virtual function define
//data member (int a;)and
//member function
class XYZ :public ABC {
public:
void SUB() override {
}
};
int main() {
//ABC obj;
//B obj;
// a=10 b=20,c=30;
return 0;
}
Comments
Post a Comment