0
when constructor is parameterize, what does it mean
constructor
2 Answers
+ 1
It's just a constructor that takes in arguments.
Example:
class myClass
{
public:
myClass(int x)
{
//code
}
};
int main()
{
myClass obj(5);
}
0
the constructor take an argument that is initializing the instance variables