|
You could, you know, post the errors.
|
Yes that would be helpful lol.
The main portion of the code looks fine now.
The fill template works
the median has an issue on line 93 you for got () after size should be
v.size() // bcause size is a function of the vector class
also im not sure if on line 95 and 99 you can do
product = v[v.size() / 2]
i think it should be like this
product = v * (v.size() / 2);
and the same goes for line 99
after those corrections i think the median function will work
Now for the insertion sort you have it as returning a double which it doesnt return anything. I think it would be better as void and just make sure it sorts them correctly.
I would just worry about printing the sorted vector in main or make a separate function to do that. Its up to you.
Because as an outsider when i see an insertion sort method I wouldnt expect it to print the vector afterwards.
Fix those issues then recompile and let us know
I just saw your post and it says insertion sort expects 2 arguments. It does expect a file name and a vector. I would move it until after the filename has been verified and opened.