previous | start | next

The getInput Function

Declaration

void getInput(int&, int&, int&);

Definition

  void getInput(int& x, int& y, int& z)
  {
    cout << "First number: ";
    cin >> x;
    cout << "Second number: ";
    cin >> y;
    cout << "Third number: ";
    cin >> z;

  }

What would happen in the main program if getInput used call by value?



previous | start | next