Thread: help needed (arrays)

  1. #1
    Registered User
    Join Date
    May 2002

    help needed (arrays)

    i been asked to create a program in which you enter 2 numbers to four different classes ( car, van, SUV, truck) and the amount (the 2 num)
    ( X, 20)
    and to get out of the loop you have to type EOF.

    Please help me!

    #include <iostream.h>
    int main ()
    char class;
    int amount, count;
    for (count=0; count<999; ++count)
    cout<<"please enter your class"endl;
    cout<<"please enter the amount"<<endl;

    now how can i display all of the amounts by each class? and the totals of them?
    Last edited by mana; 05-08-2002 at 09:59 AM.

  2. #2
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    You really should have paid attention to your teacher. "class" is obviously supposed to be just that: a class. I'm guess something like:

    class TestClass
       char ClassType;
       int ClassValue;
      //put your other member functions here

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with some arrays.
    By Poisonhearts in forum C++ Programming
    Replies: 5
    Last Post: 11-16-2007, 11:14 AM
  2. Passing pointers to arrays of char arrays
    By bobthebullet990 in forum C Programming
    Replies: 5
    Last Post: 03-31-2006, 05:31 AM
  3. Vertex Arrays
    By Shamino in forum Game Programming
    Replies: 2
    Last Post: 01-08-2006, 01:24 AM
  4. Need Help With 3 Parallel Arrays Selction Sort
    By slickwilly440 in forum C++ Programming
    Replies: 4
    Last Post: 11-19-2005, 10:47 PM
  5. Building B-Tree from Arrays
    By 0rion in forum C Programming
    Replies: 1
    Last Post: 04-09-2005, 02:34 AM