Question: class secretType { public: static int count; static int z; secretType ( ) ; secretType ( int a ) ; void print ( ) ;

class secretType
{
public:
static int count;
static int z;
secretType();
secretType(int a);
void print();
static void incrementY();
private:
int x;
static int y;
};
secretType::secretType()
{
x =1;
}
secretType::secretType(int a)
{
x = a;
}
void secretType::print()
{
cout <<"x ="<< x <<", y ="<< y
<<"z ="<< z
<<", count ="<< count << endl;
}
static void secretType::incrementY()
{
y++;
}
Consider the accompanying class and member functions definitions. How many constructors are present in the class definition?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!