Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 12 Oct 2009
Offline Last Active Dec 20 2014 08:51 PM

#5041355 Best Practice for Values Return C/C++

Posted by cHimura on 09 March 2013 - 08:05 PM



What's is the best practice for values return in a function in C/C++ for Game Engines??



In C/C++ I can return one value with the sentence return.

Texture = LoadTexture(path);


or I can return the value on second via

LoadTexure(path, &Texture);


In both examples the variable Texture is get by the function LoadTexture.
What's is the better??