I am new to C++ and programming in general and have a group assignment for class. We all worked on different parts and I have to make the 'delete' part of the program. I have to delete the specific variable a user ask (if it's in the array) than shift the array to the right. After it does what it needs to do it 'shrinks' the array by half.

I think I can do the shrink easy, but I am having weird issues with my code giving me weird memory addresses it looks like.

Here is my part of my code :)

```
else if (option == 'd') {
        cout << "Delete element:" << endl; //Ask user which array position to delete//
        for (int i = 0; i < count; ++i) {

            cout << arr[i]; //print out which array index we have///
            cout << endl;
            int pos; //starts new variable for position///
            cin >> pos;
            if (pos >= 1 && pos <= size) //As long as position is greater than 1 and less than size it loops//
            {
                for (i = pos; i <= size; i++)
                {
                    arr[i - 1] = arr[i];
                }
                arr[size] = 0;
                cout << "Elements now:" << endl;
                for
                    (i = 0; i <= size; i++)
                    cout << arr[i] << endl;
            }
            else
                cout << "Element doesn't exist" << endl; //Tells user it doesn't exist if the position doesn't exist//

```

So if I add the element such as like 2, it shows me that 2 is in the array. I enter 2 into the input, and it gives me 

`Elements now:
2
-33686019
0`

I am sorry if this is confusing! I am trying to learn myself. Thank you for your patience!