Click here to Skip to main content
15,868,016 members

Comments by Harrison H (Top 44 by date)

Harrison H 26-Jul-11 21:18pm View    
Sounds like boost smart pointer
Harrison H 26-Jul-11 21:17pm View    
Perfect. Don't forget to add that including "using namespace x" in the header is a big no no.
Harrison H 22-Jul-11 19:53pm View    
This is the only answer.
Harrison H 14-Jul-11 14:06pm View    
What? Unless he overwrites the copy constructor on that struct, there's no guarantee what's inside of that array on a shallow copy.
Harrison H 14-Jul-11 14:05pm View    
What? Christian, that is a very confusing answer. The short answer is if he wants to return an array he has to allocate it on the heap (via new) and clean it up himself later (via delete).

An even better answer would have him use vectors since he doesn't understand arrays.