0

How Delete array of object like b[students]

I've created an c++ project and I want add a remove student to my project and I don't know how ? I used array class in the project .

17th Dec 2020, 9:33 PM
Rebaz Awat
Rebaz Awat - avatar
3 odpowiedzi
+ 5
You can just shift all the elements ahead of the element (that you want to delete) one place before and then decrease the size of it by one.
18th Dec 2020, 2:14 AM
Arsenic
Arsenic - avatar
+ 2
It seems element removal is not supported in std::array (cmiiw), you meant std::array when you wrote "array class" right? Look at std::vector if you want support for element removal.
17th Dec 2020, 11:31 PM
Ipang
+ 1
Ok Thanks bro💚
17th Dec 2020, 11:32 PM
Rebaz Awat
Rebaz Awat - avatar