Hi,
How could this happened? I did not insert or delete any items in the
list, but when I print it out from the list, the order of the items are
randomly rearranged by STL list.
Sam. 10 1409
"sam" <sam++@--.com> wrote in message news:d5***********@news.hgc.com.hk... Hi,
How could this happened? I did not insert or delete any items in the list, but when I print it out from the list, the order of the items are randomly rearranged by STL list.
Sam.
Well, I assume you must have inserted at some point, or it would be empty!
:-)
Anyway, std::list never shuffles its contents, so there must be an error in
your code, either when inserting or when traversing. Post the code you used
for filling it and for reporting its contents, and maybe we can spot the
error.
-Howard
sam wrote: How could this happened? I did not insert or delete any items in the list, but when I print it out from the list, the order of the items are randomly rearranged by STL list.
This is covered in the FAQ 5.8.
V
Hi Victor,
Appreciate if you could forward the direct link for that FAQ.
Thanks
Ganesh
Victor Bazarov wrote: sam wrote: How could this happened? I did not insert or delete any items in
the list, but when I print it out from the list, the order of the items
are randomly rearranged by STL list.
This is covered in the FAQ 5.8.
V
Ganesh wrote: Hi Victor, Appreciate if you could forward the direct link for that FAQ.
http://www.parashift.com/c++-faq-lite/
And I'd appreciate it if you find time to read the archives and the
Welcome message posted here regularly where the location of the FAQ
and other useful information can be found. And I'd appreciate it if
you didn't top-post. Thanks Ganesh
Victor Bazarov wrote:
sam wrote:
How could this happened? I did not insert or delete any items in the list, but when I print it out from the list, the order of the items are randomly rearranged by STL list.
This is covered in the FAQ 5.8.
V
Thanks
Victor
Victor Bazarov wrote: This is covered in the FAQ 5.8.
FYI, these numbers change from time to time.
Abecedarian wrote: Victor Bazarov wrote:
This is covered in the FAQ 5.8.
FYI, these numbers change from time to time.
That particular one hasn't changed in a while.
Victor Bazarov wrote: Abecedarian wrote: Victor Bazarov wrote:
This is covered in the FAQ 5.8.
FYI, these numbers change from time to time.
That particular one hasn't changed in a while.
What I mean is that neither the number nor the direct URL to the
question is reliable.
::A::
Abecedarian wrote: Victor Bazarov wrote:
Abecedarian wrote:
Victor Bazarov wrote:
This is covered in the FAQ 5.8.
FYI, these numbers change from time to time.
That particular one hasn't changed in a while.
What I mean is that neither the number nor the direct URL to the question is reliable.
What I mean is that at the time when I post this both are fine.
Do you actually have a point or do you just have too much time on
your hands?
V
Victor Bazarov wrote: And I'd appreciate it if you find time to read the archives
and later
What I mean is that at the time when I post this both are fine. Do you actually have a point or do you just have too much time on your hands?
Abecedarian wrote: Victor Bazarov wrote:
And I'd appreciate it if you find time to read the archives
and later
What I mean is that at the time when I post this both are fine. Do you actually have a point or do you just have too much time on your hands?
Again, do you have a point? Please, if you do, deliver it. Using
two quotes from two different posts of mine without explaining what
you want to say by that is *meaningless*. I am not going to play
a guessing game with you. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Andrea |
last post by:
Hi,
I'm trying to emulate part of our client-server application as a web
site so customers can use it, and I'm stuck when it comes to
re-ordering items in a list.
Basically we have a list of...
|
by: Nicolas Fleury |
last post by:
In the following example:
class MyMetaclass(type): pass
class MyBaseType(object): __metaclass__ = MyMetaclass
class MyType(MyBaseType):
x = 4
y = 5
z = 6
Is there any way to modify...
|
by: Marcio Rosa da Silva |
last post by:
Hi!
In dictionaries, unlinke lists, it doesn't matter the order one inserts
the contents, elements are stored using its own rules.
Ex:
>>> d = {3: 4, 1: 2}
>>> d
{1: 2, 3: 4}
|
by: Hunters |
last post by:
Once you reorder the listview items, largeicon or smallicon view will not follow the order of list or detail view which is the correct order. For example with a listview as...
|
by: Lasse Vågsæther Karlsen |
last post by:
I have a list of items and a "rule" for ordering them.
Unfortunately, the rule is not complete so it won't define the correct
order for any two items in that list.
In other words, if I pick...
|
by: Bill |
last post by:
I'm trying to create a wizardlike interface using a couple listboxes. I
know you've seen it before. You double click on an item in one listbox and
it "moves" it to the other. I used to approach...
|
by: segue |
last post by:
Hi;
I need to change the order of a listbox array from a form app
where I select order up or down.
What's a good way to do that?
Regards;
Segue
|
by: pamelafluente |
last post by:
Hi
I have a sorted list with several thousands items. In my case, but this
is not important, objects are stored only in Keys, Values are all
Nothing. Several of the stored objects (might be a...
|
by: pavanip |
last post by:
Hi,
I have a problem with binding data to dropdownlist from database in alphabetical order.
My database contains some fields like All,Air,Airline,Books,Cars etc.
There are 2 dropdown...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |