Sholud be like this...can u help?

This is a discussion on Sholud be like this...can u help? within the C++ Programming forums, part of the General Programming Boards category; void empArray::read () { fstream data_file; int count = 0; int i = 0; char type; Temp *t; PTime *p; ...

  1. #1
    Unregistered
    Guest

    Sholud be like this...can u help?

    void empArray::read () {

    fstream data_file;

    int count = 0;
    int i = 0;
    char type;

    Temp *t;
    PTime *p;
    nonExempt *n;
    Exempt *x;
    Management *m;

    data_file.open ("Employee.dat", ios::in | ios::binary);

    inx= 0;
    while (!data_file.eof()) {
    data_file.read (&type, 1);
    switch (type) {
    case 'M':
    m = new Management;
    data_file.read ((char*) m, sizeof (Management));
    emplist[inx] = (Employee*) m;
    (inx) ++;
    count ++;
    break;

    default:
    break;
    }
    }
    data_file.close();
    }

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Don't post the same question in different threads, it's an insult to us. You didn't even wait 10 minutes either, I was okay with it at first, but now it's just getting irritating. I read through EVERY post on these forums, would you like to guess how annoying it is to read the same question I just answered?

    -Prelude
    My best code is written with the delete key.

  3. #3
    Unregistered
    Guest

    Angry FINE

    it was not the first time i posted question here,

    but i didn't meet any impolite person like YOU.

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    At 10:58 you started the following thread
    http://www.cprogramming.com/cboard/s...threadid=14428
    At 11:01, you started this one with the same question.

    >but i didn't meet any impolite person like YOU.
    I spend a lot of time on these forums answering questions and reading threads. Normally I'm a very congenial person, but when someone posts either a vague question or expects us to do all the work for them and then impatiently starts another thread with the same question, I get irritated. So which of us is being rude?
    To reduce the quantity of replies like this, keep the question and all followups to that question in the same thread.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21