Back to notes -- Keyboard shortcut: 'u'  previous -- Keyboard shortcut: 'p'  next -- Keyboard shortcut: 'n'  Slide program -- Keyboard shortcut: 't'    'double to char' instead of 'double to Point'.Lecture 2 - slide 27 : 42
Program 7
#include <iostream>
#include <string>
#include "point.h"

using namespace std;

void f(Point p){
  cout << "f(Point)" << endl;
}

void f(char *c){
  cout << "f(char *)" << endl;
}

void f(char c){
  cout << "f(char)" << endl;
}





int main(){
  double c = 5.5;        
  f(c);                   // A single best match:  f(char)
                          // The conversion double -> char is in a higher category than
                          // the user-defined double -> Point
} 

// This example is continued in the next program...