Many things are wrong with this code.
Line 6: You're allocating a raw array instead of using std::vector.
Line 7: You're creating an int with new instead of using an automatic object.
Line 9/15: You're not declaring the counter variable inside the for loop.
Line 9/15: You're using the name "counter" instead of "i", which is the established standard name for a generic counter variable.
Line 9/15: You're incrementing counter instead of the value it points to. You're missing a pair of braces here.
Line 9/12/15/18: Ugly and unnecessary dereferencing, which gets back to line 7.
Line 21: You're using delete on an array allocated with new[]. This requires deletion with delete[].
Line 21/22: Manual deletes, which gets back to line 6+7.
Line 23: http://www.cplusplus.com/forum/beginner/1988/ and http://www.cplusplus.com/forum/articles/11153/