Can we create an array of objects of the class not having default constructor, if yes then can anyone elaborate on how can we do this?
For following class for Abc a[10] in main(); is generating compiler error 'no matching function for call to `Abc::Abc()'
class Abc{ private: int x; public: Abc(int a){ x = a; } }; int main(){ Abc a[10]; // Compilation would fail here, as it would look for default constructor }