Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
An argument is a value that a function or method needs to perform its task. In a function declaration arguments are seperated by comma's.
The function 'SayHello' below does not need an argument: all it does it put the text 'Hello' on screen. It does not need additional information to perform its task.
#include <iostream> |
The function 'SayHelloManyTimes' below needs one argument: how often to put the text 'Hello' on screen. The part 'const int n' is said to be the first and only argument.
#include <iostream> |
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.