single dimension array in a class

i can not for the life of me find out how to put a single dimension array in a class. i have to do this:

In your program, define a class called Tracker that will track fuel and mileage for a jet. The class should have member variables to track the miles flown and the fuel efficiency of the jet in miles per gallon. Include a mutator function to reset the meter to zero miles, a mutator function to set the fuel efficiency, a mutator function that accepts miles flown for a trip and adds it to the meter's total, and an accessor function that returns the number of gallons of gas that the vehicle has consumed since the meter was last reset.
Your program should prompt the user to enter how many trips they wish to enter.
Then your program will ask for the total number of miles traveled in each trip and the number of gallons of fuel used for each trip. Your program will calculate the fuel efficiency of each trip, the total miles covered for all trips, the total amount of fuel used for all trips and the fuel efficiency for all trips averaged together. When your program has read in all the trip information, your program will prompt the user with a menu with these options until the user exits or enters A) to enter in a new set of trips:

A) enter new set of trips [this repeats the above interaction]
B) output fuel used [outputs each trip's fuel usage and total for all trips]
C) output miles flown [outputs each trip's mileage and total for all trips]
D) output all trips fuel efficiencies [outputs each trip's fuel efficiency as well as average overall]
E) exit

and so far i have
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
using namespace std;

class tracker
{
public:
	tracker (double milesvalue, double gasvalue);
	int trips;
private:
	double miles, gas;
} track;
int main ()
{
}
tracker::tracker (double milesvalue, double gasvalue)
{
	miles = milesvalue[trips];
	gas = gasvalue[trips];
}


i know it isn't much, but the problem i am having right now is that i can't get the miles and gas to be an array of the number of trips
Topic archived. No new replies allowed.