| double to Point via Point(double) constructor. | Lecture 2 - slide 27 : 42 Program 6 |
#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;
}
int main(){
double c = 5.5;
f(c); // A single best match: f(Point)
// f(char *) does not match at all.
}
// This example is continued in the next program...