使用水平使 17x11 纸张居中

Center a 17x11 paper using Horizontal

本文关键字:张居中 水平 17x11      更新时间:2023-10-16
#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);
}

我不断收到此错误:

"too few arguments to function 'int Horizontal(int, int)"

该代码供我个人使用,我试图将 17x11 的纸张居中。它是我的机械绘图课的正交投影纸......任何其他指针也将有助于 THX :)

错误很明显:您调用Horizontal的参数少于所需的 2 个参数:事实上,您调用它时没有参数。

难道你不应该在读完lengthwidth之后再打电话给它,这样你就可以把它们传递给它吗?