don't delete what you don't new
So what is it?
1 2 3 4
|
struct test
{
int a;
} OfS[10];
|
I get 10 element of array.
Last edited on
Thank you,But i can use this array and write data to this array.
If memory not allocated,then where is my data written to?
Memory is allocated. You're declaring it in global scope, so its lifetime is (more or less) the lifetime of the application.