qfedu-cpp-level/day2/d10.cpp

31 lines
324 B
C++
Raw Normal View History

#include <iostream>
using namespace std;
void f(int a, int)
{
cout << "f(int, int )" << endl;
}
void f(double, int)
{
cout << "f(double, int)" << endl;
}
void f(int a)
{
cout << "f(int)" << endl;
}
void f(double a)
{
cout << "f(double)" << endl;
}
int main()
{
f(1);
f(1.0, 2);
return 0;
}