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

what does func(int x, int y, int z=1) mean?

Join Date: Oct 2007
Posts: 19
Reputation: siddhant3s is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 3
siddhant3s siddhant3s is offline Offline
Newbie Poster

Re: what does func(int x, int y, int z=1) mean?

  #4  
Nov 7th, 2007
Actually it is not function overloading. In Function overloading the return type and argument type is often different. It is more versatile and a different defination(i.e. different sets of instruction for same function) is been called.
Wherein in the default argument, only one defination is there. The default argument are optional.If they are not specified,the compiler specifies them by default.

Remember all the default argument should be placed from right. i.e. func(int x, int z=1, int y) is not allowed. int z=1 should be on the right.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:49 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC