M
M
Mag1str2021-06-15 17:55:41
C++ / C#
Mag1str, 2021-06-15 17:55:41

How to check for the second letter?

There is such a code, the first letter works. But if the letters match, then it's not a worker.

if (a == 2)
        {
            for (int i = 0; i < count; i++)
                for (int j = 0; j < count; j++)
                {
                    if (ob[i].prizv[0] < ob[j].prizv[0])
                    {
                        tem = ob[i];
                        ob[i] = ob[j];
                        ob[j] = tem;
                    }
                    
                } 
        }


Full base.h code (line 338)
https://ideone.com/TeQzp1

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mag1str, 2021-06-15
@Mag1str

if (a == 2)
        {
            for (int i = 0; i < count; i++)
                for (int j = 0; j < count; j++)
                {
                    if (ob[i].prizv[0] < ob[j].prizv[0]
                            || ob[i].prizv[0] == ob[j].prizv[0] && ob[i].prizv[1] < ob[j].prizv[1])
                    {
                        tem = ob[i];
                        ob[i] = ob[j];
                        ob[j] = tem;
                    }

                }
        }

R
Rsa97, 2021-06-15
@Rsa97

1. What idiot put the class implementation into the declaration file?
2. Discover strncmp ().

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question