To get rid of plagiarism,I named it R instead of Integer and more Danish1,danish2 ,Danish 3 are integers to be initialized first by zero and other two by a value other than zero.
Code:
#include <iostream>
using namespace std;
//Muhammad Danish
//67
//SEECS
class R{
public:
int danish1;
int danish2;
int danish3;
int danish4;
R();
R(int l,int w,int h);
};
int main()
{R f();
cout<<"\n Initialised by zero using default constructor is \n"<<f().danish1;
R f2(10,3,6);
cout<<"\nOther by Initialised by value using Initialising list are\n"<<f2().danish2<<f().danish3<<f().danish4;
}
R::R():danish1(0){
cout<<"\nR Default constructor is called\n";
}
R::R(int l=1, int w=2, int h=3): danish2(l),danish3(w),danish4(h)
{cout<<"\nBox contructor is invoked";
}