Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
int* AllocArrayAndOthers(int n, /* another parms */)
{
...
int* pmyarray;
...
p = new int[n];
...
return p;
}
...
int* p = AllocArrayAndOthers(......);
...
delete [] p;
...
[code]
Of course, you may wrap this pointer into the proper class (for safety) and return this class object, but it's the other story. The key point here: only dynamic allocation creates long-lived objects on the fly...