When you declare an instance of a class, why are you only allowed to use the default constructor of that class? For example:
class A{
public:
A ( ); //default
A ( int j );
int myInt;
}
legal:
A myArray[5];
illegal:
A myArray[5](10);
When you declare an instance of a class, why are you only allowed to use the default constructor of that class? For example:
class A{
public:
A ( ); //default
A ( int j );
int myInt;
}
legal:
A myArray[5];
illegal:
A myArray[5](10);