#include<iostream.h>
#include<conio.h>
class myclass()
{
int i;
my class()
{
i=24;
}
public:
void show()
{
cout<<i;
}
};
void main()
{
//what should I write here to acess private constructor
}
You can't access a private constructor outside of the methods of the class itself so you can not write anything in main to access a private constructor.
Comment