what are formal parameters in c++ code example
Example 1: what are parameters in c++
#include <iostream>
void name_x_times(std::string name, int x){
while(0 < x){
std::cout << name << ""
}
}
int main() {
std::string my_name = "Add your name here!";
int some_number = 5;
}
Example 2: formal parameter c++
* formal parameter — the identifier used in a method to stand for the value that is passed into the method by a caller. For example, amount is a formal parameter of processDeposit.
* actual parameter — the actual value that is passed into the method by a caller.