Array of Class pop / push

I am trying to create a array of classes.
So when the alert function is trigger i want to push the Alert class with the new settings into a array. When i am done with that message i want to delete that from the array.

Can not realy find how to do that…
Or can you recommed a better way?

class Alert{
        String alfaNumId;
        String message;

You could look into using deques or vectors to hold your Alert objects.

An array of instances of a class, I think you meant.

in addition to looking at vectors/deques can you describe what you are trying to do?

If your class is simply two variables, maybe use a lookup table?