Compile problem: sort() cannot be used as a function!?
Hi, I am doing a project comparing run times of STL sorts to sorts i have written. I am having a really weird compiler error that looks like this:
Code:
main.cc: In function 'int main(int, char**)':
main.cc:56: error: 'sort' cannot be used as a function
Here is some of the code from my main:
Code:
switch(sort){
case 'q':
if(stl)
sort(my_vect.begin(), my_vect.end());
else
quick_sort(my_vect);
break;
case 'm':
if(stl)
stable_sort(my_vect.begin(), my_vect.end());
else
merge_sort(my_vect);
break;
...
when i comment out the line that calls sort() everything works fine... even stable_sort which is from the same library and uses the same parameters. Also i have another small program just one file that calls sort() and it works there fine. This is completely insane and i cannot figure it out and any hints would be great.
thanks