Hi ,I am trying to implement merge sort with list and I have this error in this code
invalid use of void expression
list<string>::iterator LIST_ITER;
sz is the size of the list
beg beginning of the list
end end of the list
Thank you in advance

void merge_sort(LIST_ITER beg, LIST_ITER end, LIST_SIZE sz){
          if(sz<2) return;
 ???????  merge_sort(beg, advance(beg,sz/2),sz);
          merge_sort(advance(beg,sz/2), end,sz);
          merge(beg,advance(beg,sz/2),end);
          //merge_sort();
     }

Make it a template function. Other than that, I need to see more code

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.