Thread: Help!!!!

  1. #1
    Chani
    Guest

    Unhappy Help!!!!

    Hi i need help solving something..
    here's my problem

    i need to put an x amount of $ to an specific object, lets say $10 for savings, 20 for checkings,$ 50 for car, 100 for rent.
    im using 4 objects, now the thing is that i need it to add and then display all of the objects at once and the sum of them.
    (and type the 999 or the EOF) to exit the object..
    i did it with classes but..
    my teacher told me that it was wrong, that there's another way to do it w/o using them..
    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;
    cin>>class;
    cout<<"please enter the amount"<<endl;
    cin>>amount;

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    A word of advice, if you decide to post in future, make sure you use a topic subject that is a little more specific than "help". It annoys people when there's no description of the problem in the subject.

    You said that you managed to solve this problem using classes. Well, IMHO, if you can do it with classes, then you should have NO problems doing it without classes!

    Think about it.

    U.
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

Popular pages Recent additions subscribe to a feed