[Solved] How can we assign variable values to a overload constructor separately(not at Initialization) in Cpp?

[ad_1]

You should not attempt to call constructors or destructors explicitly.

Assign a new value to the object in the array, like you would with ints or anything else:

st[i] = Student(Name_i, id_i);

And remove

st[i].~Student();

0

[ad_2]

solved How can we assign variable values to a overload constructor separately(not at Initialization) in Cpp?