#include <conio.h>
#include <iostream>
#include <stdlib.h>
#include <math.h>
#include <string.h>
using namespace std;
struct data{
char tanggal[20],kode[20],nama[20];
int jumlah[20],harga[20];
int modal[20]={jumlah[20]*harga[20]};
};
data batas[100];
int a,b,c,d;
void inputdata(){
cout<<"\nJumlah Data Yang Akan diinput (max 10) : ";
cin>>b;
d=0;
for(c=0;c<b;c++){
d=d+1;
cout<<"\nData ke-"<<d<<endl;
cout<<"Tanggal Produksi\t: ";
cin>>batas[a].tanggal;
cout<<"Kode Produk\t: ";
cin>>batas[a].kode;
cout<<"Nama Produk\t: ";
cin>>batas[a].nama;
cout<<"Jumlah Produksi\t: ";
cin>>batas[a].jumlah;
cout<<"Harga Pokok Penjualan (HPP)\t: ";
cin>>batas[a].harga;
cout<<"Modal\t: ";
cout<<batas[a].modal;
cout<<endl;
a++;
}
getch();
system("cls");
}
That is my code, and this is error that I got
[Error] no match for 'operator>>' (operand types are 'std::istream {aka std::basic_istream<char>}' and 'int [20]')
How to fix it ?