使用水平使 17x11 纸张居中
Center a 17x11 paper using Horizontal
#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 个参数:事实上,您调用它时没有参数。
难道你不应该在读完length
和width
之后再打电话给它,这样你就可以把它们传递给它吗?
相关文章:
- QTableView:endMoveRows在模型中重置水平页眉大小
- 使用Pybind11向Python公开Eigen::张量
- QScrollArea:由垂直滚动条引起的水平滚动条
- C++中的张量流对象检测
- 在官方张量流 resnet50 模型上运行 tflite 精度工具
- 通过水平滚动条更改标签
- PyTorch C++将数据转换为张量失败
- 如何使用 c++ 更改张量流中的per_process_gpu_memory_fraction?
- 编译 GPU 的张量流示例自定义操作
- 在 Torch C++ API 中,如何快速写入张量的内部数据?
- 如何在C++中将一个特征张量乘以另一个特征张量的标量和?
- C++ ABI 兼容性问题/张量流
- 如何从内存缓冲区加载张量流图
- PyTorch C++ 前端向前返回多个张量
- 从 std::向量值创建张量<Tensor>
- 如何在c ++中以一行(水平)打印两个文件的数据?如给定的.这两种形式来自两个不同的文本文件
- 张量流错误 此文件需要编译器和库支持 ISO C++ 2011 标准
- 如何将自定义特征张量类存储到 std::vector 中?
- 将QTextEdit的文本水平和垂直居中
- 使用水平使 17x11 纸张居中