C++ Question
I need a program that is basically a max heap. The programshould dynamically allocate a short array of 10 elements. Theprogram should read from a file called stuff.dat. stuff.dat willlooking something like this:
//stuff.dat
I 50
I 60
I 70
I 80
I 90
I 100
D 50
D 60
P
I meaning insert, D meaning delete and P meaning print
There should be 3 functions. One to insert into the heap, one todelete from the heap and one to print the heap. Int main shouldread which of the 3 to do then call that function with the valuefrom stuff.dat
Please comment where needed and use namespace std andiostream.
Answer