RSS Forums RSS
Please support our C++ advertiser: Programming Forums

Passing char * to function and populating inside

Join Date: Sep 2004
Posts: 6,576
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 31
Solved Threads: 499
Super Moderator
Narue's Avatar
Narue Narue is offline Offline
Expert Meanie

Re: Passing char * to function and populating inside

  #6  
Jul 27th, 2005
>must be somehow automatically included based on my compiler setup.
That's nice. Now forget about it. Your code is not portable if you rely on such things.

>doesn't that take care of any memory leaks?
Yes, but only because you correctly assigned the memory to tester by using a pointer to a pointer. If you had not made that change, no amount of deleting would stop the memory leak. Once again, I urge you to read the tutorial so that you know what the problem was and why the fix fixed it.
I'm here to prove you wrong.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:24 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC