hi all
I was wonderring how can I delete an object array.
i tried delete[]b ; or something simillar to that but i can t get it to work.. please help. thx. :)
struct x
{
char[20] name;
int[20] year;
.
.
.
.
.
};
class book
{
x y;
public:.
.
.
.
void newbook()
void remove()
}
void book::newbook()
{
cout << "name";
cin>> y.name;
.
.
.
.
}
int main()
{
int i = 0;
book *b = new book[50];
{in the loop
b[i].newbook() // this is in some kind of loop.. i ve got that
i++ //when you press that you add new book and so on.
}
b[4].remove(); // how do i remove for example 4th book of this object array
}