How to Check if Data is Sorter in C++
Dear Experts,
I would like to know how to check if the string data is sorted in c++ in ascending order
For example i want to check if below data is sorted if not i wish to prompt error
"<subName>ABC-R4</subName>"
"<subName>ABC-R1</subName>"
"<subName>ABC-R3</subName>"
"<subName>ABC-R2</subName>"
Thanks!
Re: How to Check if Data is Sorter in C++
Can't you use any Comparison operations with these texts?
Re: How to Check if Data is Sorter in C++
This is example set of Text.....
The value can be many.
It wont be a fix/hardcoded.It will be received from another application
Thanks!
Re: How to Check if Data is Sorter in C++
Quote:
Originally Posted by
geforce23
This is example set of Text.....
The value can be many.
Then do the comparisons in the loop... :cool:
Re: How to Check if Data is Sorter in C++
Im new to C++ programing
is it the looping will be something like this
for (int i = 0; i <= u_nb - 1; i++) {
Thanks!
Re: How to Check if Data is Sorter in C++
Re: How to Check if Data is Sorter in C++