+ 1
error in quick sort c++
I have been trying to write a quick sort algorithm in c++. But I am getting a strange error and confused how to fix it. please have a look. https://code.sololearn.com/c5tpKMujgejs
10 Answers
+ 2
You need to put the partition function above the quicksort function or put the function signature above it so that it is in scope.
That will solve the 1st problem.
+ 1
Martin Taylor I know. It's just for the practice. I was actually waiting for this commentđ
+ 1
ChaoticDawg okay. Thanks
0
ChaoticDawg okay. That's a weird thing in c++.
Thanks for answer
0
Gajendra Sonare As I recall, all languages do have an already implemented sorting algorithm, don't worry much about their implementation, focus on the difference between them and when to use each one of them
0
Gajendra Sonare
Check out the implementations here. They may help you to find your remaining issue(s).
https://www.sololearn.com/learn/669/?ref=app
0
Maher Al Dayekh okay
0
Yes, it's a good exercise in learning how to use recursion in C++. It can sometimes even be given as homework or even an examination question to program your own implementation of quicksort in various languages