Search:
Forum
General C++ Programming
static array of pointers
static array of pointers
Nov 27, 2018 at 6:07pm UTC
silentwraith
(14)
Hi all,
If someone would be kind enough to give me an example of removing an element from a static array of pointers which is pointing to a dynamic address without memory leakage, I would be grateful. Cheers!
Nov 27, 2018 at 7:30pm UTC
jonnin
(11438)
what is a static array?
I mean, you can do this
static type* array[somesize]; //??? is this what you meant?
main()
...
removish(array, 10);
...
void removeish(type * tp, int index) //is type a ** here, or a double array, or other?
{
delete[] tp[index];
tp[index] = null;
}
Last edited on
Nov 27, 2018 at 7:32pm UTC
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs