Answer the question
In order to leave comments, you need to log in
How to disable HashTable sorting in Vala?
When elements are added to the hashtable in one order, they appear in a different order.
For example:
var map = HashTable<string, string>(str_hash, str_equal);
for(int i = 0; i < 5; i++) {
map.insert(i.to_string(), "word " + i.to_string());
}
map.foreach((key, val)=>{
stdout.printf("%s\n", key);
});
Answer the question
In order to leave comments, you need to log in
margin-left: -30px;
or a pseudo-class with absolute positioning left: -30px;
HashTable in ValaUnfamiliar, but on general programming issues - create an array of the desired dimension and fill in the elements by serial numbers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question