how do i remove from and add objects into an array of objects at a specific index?
i'm very new to c++ and was just wondering if there was an easy way to do this,
thanks
how do i remove from and add objects into an array of objects at a specific index?
i'm very new to c++ and was just wondering if there was an easy way to do this,
thanks
there is nothing spacial. Just use assignement
KurtCode:class t { public: t(int xx=0 ):x(xx){} private: int x; }; int main() { t tarr[20]; t some_t(3); tarr[5] =some_t; }
If you're asking about an array that is only as big as the number of elements you have in it, you can probably use a vector.
"What are all you parallelograms doing here?" - Peter Griffin (to Joe and his wheelchair buddies)