cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Help with displaying an Object Char Arra
Page 2
Help with displaying an Object Char Array
Pages:
1
2
Dec 3, 2011 at 8:45am UTC
closed account (
NU9GNwbp
)
Ok one last thing: How do I check to see if the array exists so I can delete it at the start of the function?
Dec 3, 2011 at 3:10pm UTC
LB
(13399)
In the constructor you should initialize the pointers to 0 (null). In the function if they are not null (meaning they have been initialized) you should delete them so that when you make the new arrays you don't have a memory leak. ;)
Dec 3, 2011 at 5:15pm UTC
closed account (
NU9GNwbp
)
Wow that works! Thanks again, I appreciate the subtile hints so I can figure it out too.
I now have a solid program that works pretty well!
Topic archived. No new replies allowed.
Pages:
1
2