Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » weird reaction with const w_chart
Re: weird reaction with const w_chart [message #464205 is a reply to message #464060] Sun, 11 March 2012 05:19 Go to previous messageGo to previous message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma:
General (4 Stars)
No, it's basically an array where a hash function is used to index values with based on the key, and when you want to grab a value the index is calculated from the hash of the key.

See: http://www.pcmag.com/encyclopedia_term/0,2542,t=hash+table&i=44129,00.asp

A very simplified view of it would be like:

Array[hash_function(key)] = value;
printf("%s", Array[hash_function(key)]);

Although it requires a lot of internal work and in C++ you need to use std::unordered_map (see http://en.wikipedia.org/wiki/Unordered_map_(C%2B%2B)) or in case of using the scripts.dll API HashTemplateClass can be used.


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: need some help whit hud text
Next Topic: C&C_Nodewar :: WIP
Goto Forum:
  


Current Time: Wed Dec 18 16:49:42 MST 2024

Total time taken to generate the page: 0.00863 seconds