Additionally, use new instead of malloc.
Additionally, use new instead of malloc.
"If you lie to the compiler, it will get its revenge." - Henry Spencer
The big thing is to use new with delete or malloc with free. As long as you use one pair you should be fine. What makes new better than malloc besides it is C++ where malloc is more of a C function? I always use new for Qt objects and malloc when dynamically creating arrays.Additionally, use new instead of malloc.
If you use the 3-dimensional array make sure to free/delete every pointer and not just the overlying pointer.
ToddAtWSU (22nd February 2007)
Bookmarks