Some simple code doesn't appear to be working, and I'm not sure why.

I'm dynamically creating an array of integers. The size of this array is shown as 15, but that's just because I'm trying to debug the program. The actual size is variable at runtime.
I browsed a few sites for how to dynamically create an integer array in C++. Sites like this one came up. Their code looks like my code: an array is created, and a for loop sets the value of each element in the array.
But after my for loop runs, I get an array of size 0. What could be the problem?
This is an extremely basic C++ program compiling on Windows using Visual Studio.


int *array = new int[15];- I've yet to meet a debugger that DOES understand how to know the size of pointers... [Or understand the size of what is pointed to by the pointers, at leasts]