-
March 28th, 2013, 01:16 AM
#1
help
hey i am using set in my code to get fields from a reader xml which are being errored out but it is storing it in ordered form(i.e it is internally sorting it) not in accordance to how the reader xml has the fields.What should i do so that it write the errored file in accordance to the reader xml.
Thanks in advance
-
March 28th, 2013, 04:01 AM
#2
Re: help
Victor Nijegorodov
-
March 28th, 2013, 05:55 AM
#3
Re: help
You could start with a more coherent question. If you need ordered data, why are you using a set?
-
March 28th, 2013, 08:26 AM
#4
Re: help
then what should i use.
I want to retrieve the data in the order it is reading the reader xml ,but set is internally sorting it, which i don't want.
If i don't want to change the data structure is there any other way.
Thanks
-
March 28th, 2013, 08:29 AM
#5
Re: help
Originally Posted by ramsavi
then what should i use.
I want to retrieve the data in the order it is reading the reader xml ,but set is internally sorting it, which i don't want.
If i don't want to change the data structure is there any other way.
Thanks
I'll ask again why you're using a set? A list is the best container to maintain order efficiently.
-
March 28th, 2013, 08:33 AM
#6
Re: help
Originally Posted by ramsavi
then what should i use.
I want to retrieve the data in the order it is reading the reader xml ,but set is internally sorting it, which i don't want.
Then why set, why not the unordered_set?
Victor Nijegorodov
-
March 28th, 2013, 08:36 AM
#7
Re: help
Originally Posted by GCDEF
I'll ask again why you're using a set? A list is the best container to maintain order efficiently.
I guess OP needs a container that store unique elements. Otherwise list or vector could be used.
Victor Nijegorodov
-
March 28th, 2013, 08:39 AM
#8
Re: help
Originally Posted by VictorN
I guess OP needs a container that store unique elements. Otherwise list or vector could be used.
That's possible, but so far he hasn't said that.
-
March 28th, 2013, 01:44 PM
#9
Re: help
This is the third thread all asking (essentially) the same question, with the same lack of information and descriptive title.
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
|