what are formal parameters in c++ code example

Example 1: what are parameters in c++

#include <iostream>

// Define name_x_times() below:
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; // Change this if you like!
  // Call name_x_times() below with my_name and some_number
  
  
} // this put shit inside of the shit, look back at your adventure.cpp code future me.

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.

Tags:

Cpp Example