EDIT: You edited your post. Why do you not understand the error? You are defining two different variables with the same name.
1 2 3 4 5 6 7 8 9 10 11
void main() //error: should be int main()
{
base B;
B.print();
base (2,3);
B.print();
Derived D; //here is the error
D.print();
Derived D(3,4,5,6); //the error is actually here
D.print();
}
Your other problem is that you need to make your destructors virtual, and your print functions need to be virtual, among other things wrong with your code.
and what is the correction in the code
before of that i said when i remove the D things get worse and complex
which means i know i have tow variables with same name but when i remove it i have another complex erorr !