-
July 12th, 2011, 10:55 PM
#1
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!
Last edited by geforce23; July 12th, 2011 at 10:58 PM.
-
July 13th, 2011, 01:19 AM
#2
Re: How to Check if Data is Sorter in C++
Can't you use any Comparison operations with these texts?
Victor Nijegorodov
-
July 13th, 2011, 01:28 AM
#3
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!
-
July 13th, 2011, 01:52 AM
#4
Re: How to Check if Data is Sorter in C++
Originally Posted by geforce23
This is example set of Text.....
The value can be many.
Then do the comparisons in the loop...
Victor Nijegorodov
-
July 13th, 2011, 03:51 AM
#5
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!
-
July 13th, 2011, 04:00 AM
#6
Re: How to Check if Data is Sorter in C++
Victor Nijegorodov
-
July 13th, 2011, 07:55 PM
#7
Re: How to Check if Data is Sorter in C++
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|