having trouble with the next part of my code, I have included here what is in my
Question:
having trouble with the next part of my code, I have included here what is in my public header, my private and my main. I created my method and partly defined my method, but based on what I am supposed to do I know I don't have everything. I think I am supposed to have a for statement after it? What I am doing here is creating a sort by attribute method.
//The method should have a SortBy parameter passed to it. Call the MergeSort method. Pass to it the _heroes vector of the class and the SortBy parameter.
//Print the items in the sorted vector that is returned from MergeSort.
//NOTE 1: print the hero ID, selected attribute, and name (see screenshot).
//To get the selected attribute, call the non-static GetSortByAttribute method on each hero. Here's an example of calling the GetSortByAttribute method: std::string attribute = hero.GetSortByAttribute(sortByChoice);
//NOTE 2: The SortBy value is collected already in main. Pass it to your SortByAttribute when calling it.
//NAME RETURNS PARAMETERS SortByAttribute nothing SortBy COMMENTS Calls the MergeSort method passing the _heroes vector and SortBy parameter.
//Print the items in the vector that is returned from MergeSort. In main (which is in HeroesV2.cpp), add code to case 2 of the switch. Call your SortByAttribute method and pass the sortByChoice variable to it.//
Foundations of Financial Management
ISBN: 978-1259024979
10th Canadian edition
Authors: Stanley Block, Geoffrey Hirt, Bartley Danielsen, Doug Short, Michael Perretta