Why am I getting this error?
ERROR: error C2679: binary '>>' : no operator defined which takes a right-hand operand of type '' (or there is no acceptable conversion)
at cin
Code:
#include <iostream>
#include <cstdlib>
#include <iomanip>
using namespace std;
int main (void)
{
//declare arrays
int Length[20];
int Weight[20];
string Species[20];
//declare
int l=0, w=0, s=0;
int aveweight=0;
int numberFish=0;
cout<<"Enter number of fish:"<<endl;
cin>>numberFish>>endl;
I am still getting the same error in this spot
Code:
//loop to read in species
for (s=0;s<numberFish;s++)
{
cout<<"Enter species of fish:"<<endl;
cin>>Species[s];