Back to slide -- Keyboard shortcut: 'u'        next -- Keyboard shortcut: 'n'          function-overloading/overloading-1.cc - Exact matches - a trivial example.Lecture 3 - slide 9 : 27
Program 1

/* Two exact matches  */

#include <iostream>
#include <string>

using namespace std;

void f(long int i){
  cout << "f(long int)" << endl;
}

void f(short int i){
  cout << "f(short int)" << endl;
}





int main(){
  long int a = 5;
  f(a);             // exact match: f(long int)

  short int b = 5;
  f(b);             // exact match: f(short int)
}