cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Program help
Program help
Feb 8, 2008 at 3:26am UTC
amrcn
(20)
I'm working on a program to familiarize myself with pointers, but I'm having trouble with a function to delete a passed in pointer. Here's my code.
1
2
3
4
void
destroyDynamicArray(
double
*&numbers) {
delete
[] numbers; numbers = NULL; }
Simple, I know, but I figured it would work. It's a pointer to an array, hence the brackets. If anyone can help, I would certainly appreciate it.
Feb 8, 2008 at 3:43pm UTC
amrcn
(20)
I really can't figure this one out, guys. I use a ccmalloc program to check for memory leaks, and anytime this function is called, I get one... which I don't want to happen. Any advice would be great.
Topic archived. No new replies allowed.