オーバーロードされた関数「表示」を使用してプログラムを作成しようとしています。今のところ大丈夫ですが、行き詰まっているようです。ここで自分のコードで何が間違っているのか理解できないようです。
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double small_num, large_num;
double display;//I think the problem is here!!!
cout <<"Please enter two number starting with the smallest, then enter the largest"<<endl;
cin >> small_num;
cin >> large_num;
display(small_num, large_num);
system("pause");
return 0;
}
void display(int num1, int num2)
{
cout << num1 <<" "<< num2 << endl;
return;
}
void display(double num1, int num2)
{
cout << num1 <<" "<< num2 << endl;
}
void display(int num1, double num2)
{
cout << num1 <<" "<< num2 << endl;
}
void display(double num1, double num2)
{
cout << num1 <<" "<< num2 << endl;
}