5 prog. to do
1. allocating an Array of Float.
2. allocating an array of pointers.
3. constant and Non-Constant Pointers.
4. Constant funciton return value.
5. comma-Delimited file.
## Deliverables
1. allocating an array of float: write a funciton called makeArray that dynamically allocates n elements of an array of float, initializes all elements to 0, and and returns a pointerto the beginning of the array. here is the prototype:
float * makeArray (unsigned n);
2. allocating an array of pointer: create an array of pointers to fString objects. read each line from an input text file, allocate an FString object to hold the line, and assign the object's address to a pointer in the array. for example an array of pointers could be declared as.
const unsigned MaxRecs = 1000;
FString * fileRecs[MaxRecs];
3. Constant and Non-Constant Pointers: define a funciton with two pointer parameters. experiment with statements that call the funciton, passing it a combinations of pointer to constant and non-constant objects. find out which combinations are accpted by the compiler. in the function body, try modifying both the pointer parameters and the data they point to. demonstrate that you understand the difference between a const-qualified pointer and a pointer to a constant.
4. constant funciton return value: define a funciton that returns const float *. call the function and attempt to assign the resul to the following variables. which assignments are acceptable?
float * r1;
const float * r2;
now, change the return type to float * and again attempt to assign the result to r1 and r2. what conclusion can you draw from these experiments?
5. comma-Delimited file: write a program that uses the FindNext funciton. each record in the file might contain payroll information such as, employee ID, last name, first name, hourly pay rate, and pay period ending date.
## Platform
visual C++ compiler