在我的结构中,我有一个函数,在这里我想读取这行,这些是整数。C++在'std :: cin中不匹配'operator >>'
这里是代码(C++)的一部分:
#include <iostream>
#include <stdio.h>
#include <conio.h>
#include <string>
#include <fstream>
using namespace std;
struct kunde
{
[..]
}
struct kmph_in_mps
{
int kmph[4];
double result[10];
void kmph_erfassen() //In english: kmph_read
{
cout << "TEST";
cin >> kmph;
}
我想读从控制台公里/小时。 但我只是得到:错误:'std :: cin >> kmph'中'operator >>'不匹配|
' kmph'是一个数组。您需要读入数组的4个元素之一。 – Cornstalks 2014-11-05 17:27:25
那么'int(&)[4]'或'int *'没有重载。无论如何,这样的超负荷应该怎么办?如果你决定,你可以添加它。另外,修复你的标签。 – Deduplicator 2014-11-05 17:27:48