We're not human compilers. At least make an honest effort before asking us questions. What you posted has a number of mistakes and issues, and it indicates you have no clue what you're doing. Don't dump garbage code at us without giving us anything to go on.
Here's a free pass:
Code:
#include <iostream>
class B
{
public:
virtual void display()
{
std::cout << "No function display defined in this class\n";
}
};
class D : public B
{
};
int main()
{
D d;
d.display();
}
Go learn to code for real, and make sure you're not lazy about it. We're willing to help, of course, but if you don't have a good foundation in something, we can't point you in the right direction. That requires you to learn.