June 2025
Intermediate to advanced
1093 pages
33h 24m
English
A function call in C++ is made with parentheses. Within these, the arguments (or parameters) for the call are listed, separated by commas:
Function ( Parameter , Parameter, … )
Each parameter is again an expression, with function calls without parameters also occurring, and the list is then empty with (). And if you look closely, Function is also an expression, which usually simply consists of the name of the function to be called:
sin(3.141592);print(6*6+number, "text", name);justDo();numeric_limits<int>::max();[](auto x, auto y) { cout << x+y; } (3, 4); // lambda expression instead of function
It looks similar with index access, but you use square brackets there. You cannot list multiple parameters ...
Read now
Unlock full access