>> what do u mean i changed the return value?
You changed the return value of the GetMax function from int to double.
>> the return value represents the corresponding index of the biggest element(column in this case) of the set with the columns we add
Right, and what type is used for the index (column in this case)? int or double?
>> the warning is:
That warning will be fixed when you fix the return type of GetMax.
>> i added the map is_added when we add a column.I also inculded it to the header file
>> A little change.I didn't want to do, cause these are ready given.
You don't have to add is_added to the header. You can just add it to the main program code. Instead of adding the column to this map inside of add_column, you can just add the column to the map in the main program after the code aSol->add_column(GetMax(k,instance->n_cols));.
>> if (!aSol -> is_added[i]){
Good. This will still work if you declare the is_added map next to the k array instead of in the header.
So, for the steps a), b), c) and d) I had above, here is where you are from what I see:
a) You have to fix the return type of GetMax as I mentioned above. This will fix the warning as well. I hope you are allowed to change the GetMax function from the assignment.
b) You did good by using the is_added map. You have to remove that from the header since you are not supposed to change the header, and declare it inside the main program code.
You are only half done, though. You also have to prevent the GetMax function from accidentally choosing a column that has already been added. I already gave one idea for how to do this: if is_added[i] is true, then set k[i] to -1. That way it will never be Max. This will only work if the numbers are always positive numbers.
c) Still have to do.
d) Still have to do.