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 24 Oct 2012
Offline Last Active Dec 23 2014 10:33 AM

Topics I've Started

C++ Function Parameter

31 October 2012 - 12:11 AM

i'm currently in practice with c++, i found a situation(not critical).

as i read from tutorial & article, it said that good thing in passing argument by reference, but not to change the value inside the function, is to use the constant-references as the function parameter.

in situation that i just want to pass the argument to a function just for resource only, not to change the value itself,
1. so when is the right time to use the by-value parameter ?
2. when is the time not to use the constant-references parameter ?

may anyone have suggestion..

thank you,
happy coding Posted Image