c++ - Why won't my sorting method work? -


I have a problem with my C ++ code for college, I do not understand that my The sRecSort () method is not working.

Any help? It really confuses me!

  #include & lt; Iostream & gt; # Include & lt; Algorithm & gt; #include & lt; String & gt; #include & lt; Fstream & gt; # Include & lt; Sstream & gt; using namespace std; Void sRecSort (string n [], int s [], string e [], int len) {for (int i = 0; i  

OK, the problem is the inner loop position You can not tell at all - this is homework.

(int i = 0; i

The first element of your "sorted" array will be the right thing but the other ...

P.S. Irrelevant to the problem, however, please read a chapter about the structures in your C ++ book.

P.P.S. You have selected the worst sorting algorithm, I possibly can imagine. Try, at least.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -