Answers for "c++ function parameters"

C++
0

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.
Posted by: Guest on October-08-2020
0

c++ function parameters

void myFunction(string fname) {
  cout << fname << " Refsnes\n";
}

int main() {
  myFunction("Liam");
  myFunction("Jenny");
  myFunction("Anja");
  return 0;
}
Posted by: Guest on October-13-2021
0

c++ how to make function as argument

void func ( void (*f)(int) );
Posted by: Guest on July-21-2020

Code answers related to "c++ function parameters"

Browse Popular Code Answers by Language