short C++ Program assginment

profilef.a.qx8t
lab_13.pdf

LAB 13 April 24, 2014

Assume the following structure declaration exists:

struct CubScout { string name; int schoolGrade; string denName; } Write a complete program named cub.cpp that will allow a user to enter and print Cub Scout data. First, ask the user for the number of cub scouts. Then, call a function called makeArray that will accept the number of cub scouts as a parameter, and return a pointer to a dynamically allocated array of CubScout variables. Then, call the enterCubScouts function, which will accept the pointer to the allocated array and the number of cub scouts. Use a for loop to enter the user’s data for each cub scout in the array. Then, call the printCubScouts function, which will print out the array contents in a neat, organized way.

• Make sure you & your partner’s names are in a comment at the top of the program. • Zip & upload cub.cpp to the ilearn dropbox named Lab 13.

SAMPLE OUTPUT: