No operator matches this operan

Im almost done with this code,, this is what i have to do
Write a program that displays the roman numeral equivalent of any decimal number
between 1 and 20 that the user enters. The roman numerals should be stored in an array of
strings and the decimal number that the user enters should be used to locate the array element holding the roman numeral equivalent. The program should have a loop that allows
the user to continue entering numbers until an end sentinel of 0 is entered.
Input validation: Do not accept scores less than 0 or greater than 20

this is what i got:

// Chapter 8 - Assignment 3, Chips and Salsa
// This program produces a sales report for a salsa maker who
// markets 5 types of salsa. It includes total sales for all
// products and identifies the highest and lowest selling product.

#include<iostream>
#include <iomanip>
using namespace std;

// Function prototypes
int getTotal(int [], int);
int posOfLargest(int [], int);
int posOfSmallest(int [], int);

int main()
{
const int NUM_TYPES = 5;
string name[NUM_TYPES] =
{"mild ", "medium", "sweet ", "hot ", "zesty "};
int sales[NUM_TYPES]; // Holds jars sold for each salsa type

int totalJarsSold,
hiSalesProduct,
loSalesProduct;

for (int type = 0; type < NUM_TYPES; type++)
{
cout << "Jar sold last month of " << name[type] << ": ";
cin >> sales[type];

while (sales[type] < 0)
{ cout << "Jars sold must be 0 or more. Please re-enter: ";
cin >> sales[type];
}
}

// Call functions to get total sales and high and low selling products
totalJarsSold = getTotal(sales, NUM_TYPES);
hiSalesProduct = posOfLargest(sales, NUM_TYPES);
loSalesProduct = posOfSmallest(sales, NUM_TYPES);

// Produce the sales report
cout << endl << endl;
cout << " Salsa Sales Report \n\n";
cout << "Name Jars Sold \n";
cout << "____________________________\n";

for (int salsaType = 0; salsaType < NUM_TYPES; salsaType++)
cout << name[salsaType] << setw(21) << sales[salsaType] << endl;

cout << "\nTotal Sales:" << setw(15) << totalJarsSold << endl;
cout << "High Seller: " <<name[hiSalesProduct] << endl;
cout << "Low Seller : " << name[loSalesProduct] << endl;

return 0;
}

/************************************************************
* getTotal *
* Calculates and returns the total of the values stored in *
* the array passed to the function. *
************************************************************/
int getTotal(int array[], int numElts)
{
int total = 0;

for (int pos = 0; pos < numElts; pos++)
total += array[pos];

return total;
}


/************************************************************
* posOfLargest *
* Finds and returns the subscript of the array position *
* holding the largest value in the array passed to the *
* function. *
************************************************************/
int posOfLargest(int array[], int numElts)
{
int indexOfLargest = 0;

for (int pos = 1; pos < numElts; pos++)
{
if (array[pos] > array[indexOfLargest])
indexOfLargest = pos;
}
return indexOfLargest;
}


/************************************************************
* posOfSmallest *
* Finds and returns the subscript of the array position *
* holding the smallest value in the array passed to the *
* function. *
************************************************************/
int posOfSmallest(int array[], int numElts)
{
int indexOfSmallest = 0;

for (int pos = 1; pos < numElts; pos++)
{
if (array[pos] < array[indexOfSmallest])
indexOfSmallest = pos;
}
return indexOfSmallest;
}




It keeps telling errros about the" no operator "<<" matches these operands" on almost all the lines with the "<<"

Please help,, Im almost done,, I woul be very thankful
The code compiles, but generates a runtime error:

http://ideone.com/l6Svae

What compiler do you use?
You shall include header <string>
Thank you guys! it worked!
Topic archived. No new replies allowed.