Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C++ Language/ProgramFlow/Parameters/DefaultParameter

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

When defining a function having a parameter, you can specify a default value that will be used if the caller doesn't provide a value for that parameter. For a member function, this should appear in the class definition as void DoMember(int aiParam = 123); (use ordinary syntax when implementing this function). Additional information about default parameters (includes interactive examples)