No, open the file. Your assignment requires that the input comes from a file, as far as I can tell. Not to mention that entering in file contents on the command line is kind of weird. Basically, why would you do that when you have cin to read keyboard input anyway.Can I retried the actual contents from the argv element or do I still have to open the files in main and operate on them?
Well, you shouldn't want to skip it. The first letter in each row stands for an operation. B in the first post means build the heap. In order for your program to be the best it can be, you ought to program a response to each possible request and be flexible. If you make a program that reacts properly to only the one file, that's kind of lazy. Your instructor might see that and punish you with a lower grade.Also, once I do that how do I skip the first letter of each row i.e. B in my first post and just build my heap from the value pairs?