sorting floats+id
hello..i have a little trouble to connect id to sorted float value...here is the example:
Code:
p_marker[ id ] = float( g_pBestTouch[ id ] )1. 5005.0 2. 152.2 3.105.3 which is correct by the SortFloat, but how can i implement names to their desired float value? i went with: Code:
SortFloats( p_marker, sizeof( p_marker ), Sort_Descending ) |
Re: sorting floats+id
At the moment, thinking fast, i found the next solution:
use Trie to map values to ids. Quote:
|
Re: sorting floats+id
Made slight tweaks to this
PHP Code:
|
Re: sorting floats+id
you d maaaan :) thank you, its printing all good now
also thanks @E1_531G for trying to help (dont know why but i hate tries, if bugsy didnt saw this thread i would probably go with multiplying that Float and use sort2D haha |
Re: sorting floats+id
Quote:
|
Re: sorting floats+id
Quote:
If you want to have a discussion about it, you should create a new thread since it's unrelated to this topic. |
| All times are GMT -4. The time now is 07:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.