execute paramerized constructor

//reply fast please.....
class abc
{
int a;
public:
abc()
{
}
abc(int)
{

}
};
void main()
{
abc obj[10];
}


//in this case abc() constructor executes. i want to exectue abc(int),
//how can i do this???
abc obj[10] = {abc(1), abc(2), /*...*/, abc(10)};
or
abc obj[10] = abc(9);//To call constructor for all values
Last edited on
Topic archived. No new replies allowed.