Its keeps on saying this.
(41) : error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > [10]
' (or there is no acceptable conversion)
Error executing cl.exe.
PRO3LECT5.exe - 1 error(s), 0 warning(s)
-----------------------------------------------------------------------------------
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
using namespace std;
void main()
{
ifstream in_stream;
ofstream out_stream;
in_stream.open("input.dat");
if(in_stream.fail())
{
cout << "ERROR IN INDATA.DAT" <<endl;
exit(1);
}
out_stream.open("output.dat");
if(out_stream.fail())
{
cout << "ERROR IN OUTDATA.DAT" <<endl;
exit(1);
}
string name1[10], name2[10];
int QZ1, QZ2, QZ3, QZ4, QZ5, QZ6, QZ7, QZ8, QZ9, QZ10;
double AVG;
while(!in_stream.eof())
{
in_stream >> name1 >> name2 >> QZ1 >> QZ2 >> QZ3 >> QZ4 >> QZ5 >> QZ6 >> QZ7 >> QZ8 >> QZ9 >> QZ10;
AVG = (QZ1 + QZ2 + QZ3 + QZ4 + QZ5 + QZ6 + QZ7 + QZ8 + QZ9 + QZ10)/10;
out_stream << name1 << name2 << QZ1 << QZ2 << QZ3 <<QZ4 << QZ5 << QZ6 << QZ7 << QZ8 << QZ9 << QZ10 << AVG << endl;
}
in_stream.close();
out_stream.close();
}