Source of functions.cpp


  1: //functions.cpp

  2: 
  3: #include <iostream> //this is where cout, endl and cin.ignore() live

  4: using namespace std; //<- This is a "using directive"

  5: 
  6: void GetTwoValuesFromUser
  7: (
  8: int& i, //out

  9: int& j  //out

 10: )
 11: {
 12:     cout << "\nEnter two integer values: ";
 13:     cin >> i >> j;
 14: }
 15: 
 16: void DisplayValues
 17: (
 18: int i, //in

 19: int j  //in

 20: )
 21: {
 22:     cout << "The first value entered was " << i << ".\n";
 23:     cout << "The second value entered was " << j << ".\n";
 24: }