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?
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?