Sorry. We don't do homework :)
WolfPack
Postaholic
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
Looks to me like the main problem you may have is dynamically allocating memory. In that case remember, when you use new follow it with delete[].
The actual questions is just a case of thinking it through carefully on paper first. Simple
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439