C++ comparing bunch of values with a given one

后端 未结 10 921
一向
一向 2021-01-21 06:02

I need to compare one given value with a retrieved values. I do this several times in the code. I am not satisfied with how it looks and I am seeking for a some sort of an util

10条回答
  •  鱼传尺愫
    2021-01-21 06:43

    Which changes more, the 'value' or the values returned by 'getValueX()'? You can insert everything into a hash_map/map and then do a search that way, as you've suggested with the containers.

提交回复
热议问题