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


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

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