Well...i'm supposed to write a program that uses a datafile as the input. We're supposed to create a table of salaries based on the amount of sales and commission.

The input I've created as a datafile is:
250
561
736
832
841
934
975
1069
1100
1399
1500
1739
2222
4428
5233
6175
7419
8850
-1
The output is supposed to look like this somewhat:

Ranges: Number of People:
$200-299 9
$300-399 3
$400-499 0
$500-599 1
$600-699 1
$700-799 1
$800-899 1
$900-999 1
$1,000 and over 3

I'm a newbie and have no clue on how to do arrays...initialize and use....and I still have problems with my coding...can u take a look and help with what i need to fix to straighten things out?

// Program 6 - No Extra Credit
#include <iostream>

using std::cout;
using std::cin;
using std::endl;

void salary[data410.dat];

#include <iomainp>

using std::setw;

int main ()
{
float s[ 9 ] = { $200-299, $300-399, $400-499, $500-599, $600-699,
$700-799, $800-899, $900-999, $1,000 and over };

cout<<"Range"<<setw(14)<<"Number of People"<<endl;

for (s = 0; s < 20; s++)
cout<<setw(15)<<s[s]<<setw(15)<<s<<endl;

salary(int sales);

return 0;
}

void salary(int sales)
{
float salary;

cin>>sales;
while (salary != -1);
salary = 200 + (sales * 0.09);
}