Question: C++. How to load text file with inputs into MAX-HEAP by reading line by line from the file. For example the text file name is
C++. How to load text file with inputs into MAX-HEAP by reading line by line from the file. For example the text file name is input1.txt How to access these inputs into an array and load into Max Heap?
sample Input1.txt is:
(line 1) 2
(line 2) 2
(line 3) 25 30
(line 4) 20 18
(line 5) 11 15
I want to only access lines 3-5 where the first numbers are the address and second is the value of the element.
andStep by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
