-1
#include "Calculator.h"
#include <iostream>
#include <string>
#include <cmath>
#include "DoWhileLoops.h"
#include "Average.h"
#include "SwitchStatement.h"
#include "LogicalOperators.h"
#include <cstdlib>
#include "RandomNumberGenerator.h"
#include <stdlib.h>
#include <ctime>
#include "DefaultArguments.h"
#include "FindingCenter.h"
using namespace std;
int length;
int width;
int Horizontal(int length, int width);
FindingCenter::FindingCenter()
{
cout << Horizontal();
cout << "What is the length?" << endl;
cin >> length;
cout << "What is the width?" << endl;
cin >> width;
}
int Horizontal(int length, int width)
{
return ((17-(length + width))/ 3);
}
我不斷收到此錯誤17x11紙:中心利用水平
"too few arguments to function 'int Horizontal(int, int)"
的代碼是我個人的使用即時通訊試圖居中17x11紙。 其正確的投影紙我的機械繪圖類......也任何其他指針將有助於thx :)
錯誤非常明顯,當你需要2個參數時,你會調用沒有參數的'Horizontal'。 – wil93
由於您尚未提供任何參數,因此您還不清楚您想要對Horizontal()執行什麼操作。也許,你想要用戶輸入,然後打印出水平(長度,寬度)?我的代碼在這裏:https://ideone.com/0IgEi3 –