#include void f(int i) { cout << "int i = " << i << endl << endl; } void f(float f) { cout << "float f = " << f << endl << endl; } void f(double d) { cout << "double d = " << d << endl << endl; } int main(int argc, char *argv[]) { int x = 4; float y = 4.0; double z = 4.0; f(x); f(y); f(z); f(3.0); // A constant is always "int" or "double" f((float) 3.0); // force "float" }