I dunno if thats what its called but, heres what i need to do, when i try it i keep getting erros to do with memory and stuff not working properly.

I have a class:

Code:
class Connection {
    public:
        int socket;
};
I then need to have an array of this which can be set at run time, ie i can have 10 connections or 2. this is what i tried;

Code:
int amount = 10;
Connection *conn;

delete [] conn;
conn = new Connection[amount];
Should that work ? or is it all wrong ?