ATL Development   «Prev  Next»

Adding Application Data - Exercise

Objective: Add MAX_RECS, m_PhRecs, m_numrecs, and m_currec to CPhBookObj.

Instructions

Add the following application data to the project as described in the simulation:
  1. Add constant #define MAX_RECS 32 to PhBookObj.h.
  2. Add PhRec m_PhRecs[MAX_RECS] to CPhBookObj as a protected member of CPhBookObj.
  3. Add long m_numrecs as a protected member of CPhBookObj.
  4. Add long m_currec as a protected member of CPhBookObj.
  5. In the constructor of CPhBookObj, initialize m_numrecs to 0 and m_currec to -1.
  6. Make sure the project builds without errors.

Exercise scoring

20 points when all tasks are done and the project builds: autoscored. This exercise is worth 20 points and is scored automatically. Follow the instructions. When all tasks are done and the project builds click the Submit button and you will receive full credit for the exercise.