Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Yes, i know it's homework

Name: Anonymous 2005-11-18 22:25

But i still wanna ask you guys

here's the problem

/////////////////////////////////////////////////////////////////////
// Program 10                  POINTERS                  COSC 1436
/////////////////////////////////////////////////////////////////////

      Define a record structure to hold a set of test scores,
      number of tests, and the average score. The number of
      records are to be determined at runtime. Also the
      number of tests for each record is to be determined at
      runtime. Calculate the average test score for the set
      the set of test scores in each record. Display records.
      Demonstrate with a least five records.


This question must use pointers (couldn't do to class that day, car problem)
i want to ask, is there a way to create a array in the structure, with the size of the array to be defined later?
like

struct record
{
    int test[];
    int num_test;
    float average;
};

and ya, it didn't compile, where am i wrong?

Name: Anonymous 2005-11-19 0:55

vector<int> scores; // ftw

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List