02-10-2009 04:44 AM
hello all,
I wish to know, if it is possible to use map like in C++?
I have 2 arrays, one of string and one of dbl. The user need to write a name of parameter in string control, and after i need to find the value of this parameter by a searching in the string array. It's a long solution. And i need to do it many times. It's for that i have thinking of map in c++
If someone can hlep me ^^
thanks
Solved! Go to Solution.
02-10-2009 04:51 AM - edited 02-10-2009 04:52 AM
Hi mioumiou,
this should work for you.
Mike
02-10-2009 05:01 AM
thanks a lot for your quick answer.
I thought about this solution, but the problem, it's that i will have a array of 500 or more parameters, and this solution, will take a little bit of time to find just one parameter. And for each iteration of while loop, i need to make this research 500 times. This will take a very long time.
I think about map in c++ but if you are a better idea, i take
02-10-2009 05:31 AM
Youn might want to look at variant attributes.
You can learn more in this Community Nugget called "Implementing sets with variant attributesin this Community Nugget called "Implementing sets with variant attributes"
02-10-2009 07:52 AM
02-10-2009 08:10 AM
thanks a lot,
variants seems to be the solution.
thanks thanks thanks
02-10-2009 09:01 AM - edited 02-10-2009 09:01 AM
Many thanks, Phillip for point to these links. I was pretty skeptic about attributes before. But it just incredible!
Just done quick test - searching 25000 lines in 80000 strings dictionary taking approx. 22 seconds with search array, or 6 seconds with small improvement or just 20 milliseconds with Variant attributes.
1000 times faster... Still can't believe...
Andrey.
02-10-2009 09:18 AM