I searched around the internet ..couldn't find out if there's any way to create an array of objects from a class with no default constructor. Couldn't find any way of doing it--Does anyone know if it's even possible. I know I could give the class's constructor a default parameter but I want to know if it's possible to feed parameters in some kind of initializer list.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
class a{
public:
a(string s){;}
};
int main(){
//ANY WAY OF USING AN INITIALIZER LIST ON NEXT LINE?
a arrayOfA[10];
return 1;
}